I assume the code will be something like (in Linux <http://www.makelinux.net/books/lkd2/ch06lev1sec7>) local_irq_disable(); spin .... local_irq_enable(); Regards, Adriaan van Os _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com The Kernel Programming Guide in the Synchronization Primitives chapter says the following in the Locks section, Spinlocks subsection Note that a thread may not block while holding a spinlock, because that could cause deadlock. Further, preemption is disabled on a given processor while a spinlock is held. However, I haven't been able to locate the code that does this or similar, at least not in osfmk/kern/locks.c. What is the recommended practice on Mac OS X ? I mean, apart from using the lck_ functions, who are not practical to use in my case.
participants (1)
-
Adriaan van Os