G'day, I've been investigating the different locking/synchronization primitives with respect to different OS kernels. In darwin it appears that there are generally two places to look for primitives... mach (ofsmk) or bsd. Reading the Kernel Programming guide the section Synchronization Primitives outlines the recommended primitives, which are defined by the mach. So... I attempted to use spinlocks with the simple_lock interface (defined in kern/simple_lock.h), but kept getting the complaint "passed 2 arguments, but takes just 1" for simple_lock_init. What I found was that a redefinition of the simple_lock interface was made in sys/lock.h and simple_lock and simple_unlock functions do nothing, which overrides kern/simple_lock.h. I can't avoid including this because it is brought in by sys/vnode.h, and many other headers. Does anybody know why simple_lock interfaced is redefined and why the lock and unlock do nothing? I need this to work on a multiprocessor machine... and this doesn't appear to help. Also, are the other interfaces for locking/synchronization described in Kernel Programming correct? Should I be using different interfaces in BSD from mach? What does monotreme mean? Note. I am writing a filesystem... so I can't avoid using BSD headers. Thanks. -- Wally Crooze +-------------------------------------------------------+ | ,-_|\ Wally Crooze <wallycrooze@pobox.com> | | / \ | | \_,-._/ | | v | +-------------------------------------------------------+ _______________________________________________ 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.
participants (1)
-
Wally Crooze