patch-2.4.5 linux/include/asm-cris/semaphore-helper.h
Next file: linux/include/asm-cris/stat.h
Previous file: linux/include/asm-cris/segment.h
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Tue May 1 16:05:00 2001
- Orig file:
v2.4.4/linux/include/asm-cris/semaphore-helper.h
- Orig date:
Thu Feb 8 16:32:44 2001
diff -u --recursive --new-file v2.4.4/linux/include/asm-cris/semaphore-helper.h linux/include/asm-cris/semaphore-helper.h
@@ -1,4 +1,4 @@
-/* $Id: semaphore-helper.h,v 1.1 2000/07/13 16:52:42 bjornw Exp $
+/* $Id: semaphore-helper.h,v 1.3 2001/03/26 15:00:33 orjanf Exp $
*
* SMP- and interrupt-safe semaphores helper functions. Generic versions, no
* optimizations whatsoever...
@@ -10,6 +10,12 @@
#include <asm/atomic.h>
+#define read(a) ((a)->counter)
+#define inc(a) (((a)->counter)++)
+#define dec(a) (((a)->counter)--)
+
+#define count_inc(a) ((*(a))++)
+
/*
* These two _must_ execute atomically wrt each other.
*/
@@ -17,12 +23,6 @@
{
atomic_inc(&sem->waking);
}
-
-#define read(a) ((a)->counter)
-#define inc(a) (((a)->counter)++)
-#define dec(a) (((a)->counter)--)
-
-#define count_inc(a) ((*(a))++)
static inline int waking_non_zero(struct semaphore *sem)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)