summaryrefslogtreecommitdiff
path: root/linux/src/include/asm-i386
diff options
context:
space:
mode:
Diffstat (limited to 'linux/src/include/asm-i386')
-rw-r--r--linux/src/include/asm-i386/semaphore.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/linux/src/include/asm-i386/semaphore.h b/linux/src/include/asm-i386/semaphore.h
index 2a5f5b7..c351c3a 100644
--- a/linux/src/include/asm-i386/semaphore.h
+++ b/linux/src/include/asm-i386/semaphore.h
@@ -30,6 +30,10 @@ struct semaphore {
#define MUTEX ((struct semaphore) { 1, 0, 0, NULL })
#define MUTEX_LOCKED ((struct semaphore) { 0, 0, 0, NULL })
+/* Special register calling convention:
+ * eax contains return address
+ * ecx contains semaphore address
+ */
asmlinkage void down_failed(void /* special register calling convention */);
asmlinkage void up_wakeup(void /* special register calling convention */);
@@ -54,7 +58,7 @@ extern inline void down(struct semaphore * sem)
"js " SYMBOL_NAME_STR(down_failed) "\n"
"1:\n"
:"=&a" (d0), "=m" (sem->count)
- :
+ :"c" (sem)
:"memory");
}
@@ -97,7 +101,7 @@ extern inline int down_interruptible(struct semaphore * sem)
"xorl %%eax,%%eax\n"
"2:\n"
:"=&a" (ret), "=m" (sem->count)
- :
+ :"c" (sem)
:"memory");
return(ret) ;
@@ -122,7 +126,7 @@ extern inline void up(struct semaphore * sem)
"jle " SYMBOL_NAME_STR(up_wakeup)
"\n1:"
:"=&a" (d0), "=m" (sem->count)
- :
+ :"c" (sem)
:"memory");
}