Atomic functions problem
Atomic functions problem
- Subject: Atomic functions problem
- From: Christian Pasin <email@hidden>
- Date: Thu, 7 Nov 2002 11:37:57 +0100
I'm trying to use an atomic function in a NDRV driver (for example
AddAtomic), but these functions seem not to work correctly . My code is
like the following:
SInt32 gMyInterruptDepth ;
gMyInterruptDepth=0x00000010;
DebugValue(AddAtomic(1,&gMyInterruptDepth));
DebugValue(gMyInterruptDepth);
(Note DebugValue print a value on system.log)
I obtain these results:
....FFFFFFCB (the value returned by AddAtomic)
....10 (the value of my variable is not changed)
I used also IncrementAtomic8 but the results were the same.
I'm compiling and executing the code on a MacOsX 10.1.5 with a G4
processor, but I tried also on a Jaguar version with dual processor.
Why don't atomic functions work correctly?
Thanks
Christian
email@hidden
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.