]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/semaphore.h
Simplify semaphore implementation
[mv-sheeva.git] / include / linux / semaphore.h
index a107aebd91483739bebf3bf097a7ddadad53785b..a7125daaff90d672272f7817a98e2515d8a04dba 100644 (file)
 
 /*
  * The spinlock controls access to the other members of the semaphore.
- * 'count' is decremented by every task which calls down*() and incremented
- * by every call to up().  Thus, if it is positive, it indicates how many
- * more tasks may acquire the lock.  If it is negative, it indicates how
- * many tasks are waiting for the lock.  Tasks waiting for the lock are
- * kept on the wait_list.
+ * 'count' represents how many more tasks can acquire this semaphore.
+ * Tasks waiting for the lock are kept on the wait_list.
  */
 struct semaphore {
        spinlock_t              lock;
-       int                     count;
+       unsigned int            count;
        struct list_head        wait_list;
 };