Re: Locking and synchronization primitives
A couple of more things on locking/synchronization primitives... How effective are the implementations of funnels and other locking mechanisms (e.g. simple_locks) for SMP systems? I noticed that simple_lock is defined as either 1 (as funnels are in effect), disable_preemption (on Uni-processors) or usimple_lock (on SMP systems). I was under the impression that usimple_locks were for uni-processor systems... this is confusing. Also, can the locking and synchronization primitives be nested safely? i.e. simple_lock(lock1) simple_lock(lock2) simple_unlock(lock2) simple_unlock(lock1) Does simple_locks disable interrupts, etc? Also what interface is equivalent to synch-variables... such as sv_init, sv_rmproc? I'm also looking for a mechanism that will allow me to attempt to upgrade (i.e. read to write) an mrlock, but if it can't get it immediately it will return still holding the read (similar to the try versions of the other locks). Cheers. -- 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