Author: bonefish Date: 2011-05-12 01:49:52 +0200 (Thu, 12 May 2011) New Revision: 41453 Changeset: https://dev.haiku-os.org/changeset/41453 Modified: haiku/branches/developer/bonefish/signals/src/system/kernel/sem.cpp Log: Clarified locking order. Modified: haiku/branches/developer/bonefish/signals/src/system/kernel/sem.cpp =================================================================== --- haiku/branches/developer/bonefish/signals/src/system/kernel/sem.cpp 2011-05-11 23:38:06 UTC (rev 41452) +++ haiku/branches/developer/bonefish/signals/src/system/kernel/sem.cpp 2011-05-11 23:49:52 UTC (rev 41453) @@ -64,10 +64,10 @@ // additional need sSemsSpinlock for write access. // lock itself doesn't need protection -- sem_entry objects are never deleted. // -// The locking order is sSemsSpinlock -> sem_entry::lock. All semaphores are -// in the sSems array (sem_entry[]). Access by sem_id requires computing the -// object index (id % sMaxSems), locking the respective sem_entry::lock and -// verifying that sem_entry::id matches afterwards. +// The locking order is sSemsSpinlock -> sem_entry::lock -> scheduler lock. All +// semaphores are in the sSems array (sem_entry[]). Access by sem_id requires +// computing the object index (id % sMaxSems), locking the respective +// sem_entry::lock and verifying that sem_entry::id matches afterwards. struct queued_thread : DoublyLinkedListLinkImpl<queued_thread> {