patch-2.4.20 linux-2.4.20/include/asm-i386/semaphore.h

Next file: linux-2.4.20/include/asm-i386/smp.h
Previous file: linux-2.4.20/include/asm-i386/scatterlist.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/include/asm-i386/semaphore.h linux-2.4.20/include/asm-i386/semaphore.h
@@ -213,5 +213,10 @@
 		:"memory");
 }
 
+static inline int sem_getcount(struct semaphore *sem)
+{
+	return atomic_read(&sem->count);
+}
+
 #endif
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)