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 christian@villagetronic.com _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.