diff options
Diffstat (limited to 'mit-pthreads/machdep/syscall-template-i386-bsdi-2.0.S')
-rw-r--r-- | mit-pthreads/machdep/syscall-template-i386-bsdi-2.0.S | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mit-pthreads/machdep/syscall-template-i386-bsdi-2.0.S b/mit-pthreads/machdep/syscall-template-i386-bsdi-2.0.S new file mode 100644 index 00000000000..3299f49195f --- /dev/null +++ b/mit-pthreads/machdep/syscall-template-i386-bsdi-2.0.S @@ -0,0 +1,48 @@ +#include <sys/syscall.h> + +#ifdef __STDC__ + +#define SYSCALL(x) \ + .globl _machdep_sys_##x##; \ + \ +_machdep_sys_##x##:; \ + \ + movl $(SYS_##x##), %eax; \ + .byte 0x9a; .long 0; .word 7; \ + jb 1b; \ + ret; + +#else + +#define SYSCALL(x) \ + .globl _machdep_sys_/**/x/**/; \ + \ +_machdep_sys_/**/x/**/:; \ + \ + movl $(SYS_/**/x/**/), %eax; \ + .byte 0x9a; .long 0; .word 7; \ + jb 1b; \ + ret; + +#endif + + +/* + * Initial asm stuff for all functions. + */ + .text + .align 2 + + +/* ========================================================================== + * error code for all syscalls. The error value is returned as the negative + * of the errno value. + */ + +1: + neg %eax + ret + +#define XSYSCALL(NAME) SYSCALL(NAME) + +XSYSCALL(SYSCALL_NAME) |