OT List utilities & Classic not mixing well (for me)
OT List utilities & Classic not mixing well (for me)
- Subject: OT List utilities & Classic not mixing well (for me)
- From: Graham Parkinson-Morgan <email@hidden>
- Date: Thu, 25 Mar 2004 17:23:35 -0800
Since I had such great success here yesterday, I am back for more :)
As I think I mentioned in my last post, I removed STL container code
that was merrily calling the 'new' operator inside the Notifier
callback, and replaced it with OT's memory allocation and list
utilities. In OS9 and OSX, the networking code is now wonderfully
stable, even under horrid stress.
The problem now is that under Classic, with the same code, calls to
OTLIFOEnqueue will cause a freeze and a force quit. (Compiled with
CodeWarrior 9.2).
The lists can grow inside the Notifier callback, and gets consulted
outside the Notifier callback, so I would like to keep inside the
safety of OTLists, rather than dodge the bullet and write something
else.
By stepping into OTLIFOEnqueue, I can see that the freeze happens at
the lwarx atomic operator
li r0,0
A: lwz r7,0(r3) // r7 = list.fHead (r3 = 0x0A357A8E from the
'new' pool)
stw r7,0(r4) // nextLink.fNext = r7 (r4 = 0x0087E224 from
OTMemAlloc)
lwarx r6,r0,r3 <------------ freeze.
cmpw r7,r6
bne B
sync
stwcx. r4,r0,r3
bne A
sync
blr
B:
Since this freeze is happening on a reserve operator, I might throw in
that this freeze is happening on a G5 twin. Hope that's not a red
herring.
Is there something else crushingly obvious that I am not doing? As
usual, any enlightenment humbly appreciated.
Graham
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.