patch-2.4.10 linux/include/asm-i386/semaphore.h
Next file: linux/include/asm-i386/softirq.h
Previous file: linux/include/asm-i386/ptrace.h
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Sun Sep 23 10:31:02 2001
- Orig file:
v2.4.9/linux/include/asm-i386/semaphore.h
- Orig date:
Tue Aug 7 12:48:43 2001
diff -u --recursive --new-file v2.4.9/linux/include/asm-i386/semaphore.h linux/include/asm-i386/semaphore.h
@@ -131,6 +131,10 @@
:"memory");
}
+/*
+ * Interruptible try to acquire a semaphore. If we obtained
+ * it, return zero. If we were interrupted, returns -EINTR
+ */
static inline int down_interruptible(struct semaphore * sem)
{
int result;
@@ -155,6 +159,10 @@
return result;
}
+/*
+ * Non-blockingly attempt to down() a semaphore.
+ * Returns zero if we acquired it
+ */
static inline int down_trylock(struct semaphore * sem)
{
int result;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)