Re: Locking and synchronization primitives
Re: Locking and synchronization primitives
- Subject: Re: Locking and synchronization primitives
- From: Wally Crooze <email@hidden>
- Date: Thu, 29 May 2003 14:39:19 +1000
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 <email@hidden> |
| / \ |
| \_,-._/ |
| v |
+-------------------------------------------------------+
_______________________________________________
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.