patch-2.4.20 linux-2.4.20/include/asm-mips/semaphore.h
Next file: linux-2.4.20/include/asm-mips/sembuf.h
Previous file: linux-2.4.20/include/asm-mips/semaphore-helper.h
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Thu Nov 28 15:53:15 2002
- Orig file:
linux-2.4.19/include/asm-mips/semaphore.h
- Orig date:
Fri Aug 2 17:39:45 2002
diff -urN linux-2.4.19/include/asm-mips/semaphore.h linux-2.4.20/include/asm-mips/semaphore.h
@@ -130,7 +130,7 @@
* down_trylock returns 0 on success, 1 if we failed to get the lock.
*
* We must manipulate count and waking simultaneously and atomically.
- * Here, we this by using ll/sc on the pair of 32-bit words. This
+ * Here, we do this by using lld/scd on the pair of 32-bit words. This
* won't work on MIPS32 platforms, however, and must be rewritten.
*
* Pseudocode:
@@ -194,4 +194,9 @@
__up(sem);
}
+static inline int sem_getcount(struct semaphore *sem)
+{
+ return atomic_read(&sem->count);
+}
+
#endif /* _ASM_SEMAPHORE_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)