patch-2.4.20 linux-2.4.20/include/asm-alpha/semaphore.h
Next file: linux-2.4.20/include/asm-alpha/socket.h
Previous file: linux-2.4.20/include/asm-alpha/rwsem.h
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
Thu Nov 28 15:53:15 2002
- Orig file:
linux-2.4.19/include/asm-alpha/semaphore.h
- Orig date:
Tue Nov 20 15:49:31 2001
diff -urN linux-2.4.19/include/asm-alpha/semaphore.h linux-2.4.20/include/asm-alpha/semaphore.h
@@ -80,6 +80,11 @@
extern void up(struct semaphore *);
extern void __up_wakeup(struct semaphore *);
+static inline int sem_getcount(struct semaphore *sem)
+{
+ return atomic_read(&sem->count);
+}
+
/*
* Hidden out of line code is fun, but extremely messy. Rely on newer
* compilers to do a respectable job with this. The contention cases
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)