···4949#define GET_CURRENT_PID PICIFY(__current_pid)
50505151 NON_LAZY_STUB(__current_pid)
5252-#define __current_pid (%edx)
5252+#define __current_pid_var (%edx)
5353#else
5454#define GET_CURRENT_PID
5555#endif
56565757/*
5858- * If __current_pid >= 0, we want to put a -1 in there
5858+ * If __current_pid_var >= 0, we want to put a -1 in there
5959 * otherwise we just decrement it
6060 */
61616262LEAF(___vfork, 0)
6363 GET_CURRENT_PID
6464- movl __current_pid, %eax
6464+ movl __current_pid_var, %eax
65650:
6666 xorl %ecx, %ecx
6767 testl %eax, %eax
6868 cmovs %eax, %ecx
6969 decl %ecx
7070 lock
7171- cmpxchgl %ecx, __current_pid
7171+ cmpxchgl %ecx, __current_pid_var
7272 jne 0b
7373 popl %ecx
7474 movl $(SYS_vfork), %eax // code for vfork -> eax
···7676 jnb L1 // jump if CF==0
7777 GET_CURRENT_PID
7878 lock
7979- incl __current_pid
7979+ incl __current_pid_var
8080 pushl %ecx
8181 BRANCH_EXTERN(tramp_cerror)
8282···8989L2:
9090 GET_CURRENT_PID
9191 lock
9292- incl __current_pid
9292+ incl __current_pid_var
9393 jmp *%ecx
94949595#elif defined(__x86_64__)
96969797/*
9898- * If __current_pid >= 0, we want to put a -1 in there
9898+ * If __current_pid_var >= 0, we want to put a -1 in there
9999 * otherwise we just decrement it
100100 */
101101102102LEAF(___vfork, 0)
103103- movq __current_pid@GOTPCREL(%rip), %rax
103103+ movq __current_pid_var@GOTPCREL(%rip), %rax
104104 movl (%rax), %eax
1051050:
106106 xorl %ecx, %ecx
107107 testl %eax, %eax
108108 cmovs %eax, %ecx
109109 subl $1, %ecx
110110- movq __current_pid@GOTPCREL(%rip), %rdx
110110+ movq __current_pid_var@GOTPCREL(%rip), %rdx
111111 lock
112112 cmpxchgl %ecx, (%rdx)
113113 jne 0b
···116116 UNIX_SYSCALL_TRAP // do the system call
117117 jnb L1 // jump if CF==0
118118 pushq %rdi // put return address back on stack for cerror
119119- movq __current_pid@GOTPCREL(%rip), %rcx
119119+ movq __current_pid_var@GOTPCREL(%rip), %rcx
120120 lock
121121 addq $1, (%rcx)
122122 movq %rax, %rdi
···129129 jmp *%rdi
130130131131L2:
132132- movq __current_pid@GOTPCREL(%rip), %rdx
132132+ movq __current_pid_var@GOTPCREL(%rip), %rdx
133133 lock
134134 addq $1, (%rdx)
135135 jmp *%rdi
+9
src/kernel/libsyscall/sys_i386/aio_suspend.S
···11#define __SYSCALL_32BIT_ARG_BYTES 12
22#include "SYS.h"
3344+#ifndef SYS_aio_suspend
55+#error "SYS_aio_suspend not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__aio_suspend, aio_suspend, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl aio_suspend$UNIX2003
615 aio_suspend$UNIX2003 = __aio_suspend
+8
src/kernel/libsyscall/sys_i386/close.S
···11#define __SYSCALL_32BIT_ARG_BYTES 4
22#include "SYS.h"
3344+#ifndef SYS_close
55+#error "SYS_close not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__close, close, 1, cerror)
1010+#endif
1111+412#if defined(__i386__)
513 .globl close$UNIX2003
614 close$UNIX2003 = __close
+9
src/kernel/libsyscall/sys_i386/fsync.S
···11#define __SYSCALL_32BIT_ARG_BYTES 4
22#include "SYS.h"
3344+#ifndef SYS_fsync
55+#error "SYS_fsync not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__fsync, fsync, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl fsync$UNIX2003
615 fsync$UNIX2003 = __fsync
+9
src/kernel/libsyscall/sys_i386/msgrcv.S
···11#define __SYSCALL_32BIT_ARG_BYTES 20
22#include "SYS.h"
3344+#ifndef SYS_msgrcv
55+#error "SYS_msgrcv not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__msgrcv, msgrcv, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl msgrcv$UNIX2003
615 msgrcv$UNIX2003 = __msgrcv
+9
src/kernel/libsyscall/sys_i386/msgsnd.S
···11#define __SYSCALL_32BIT_ARG_BYTES 16
22#include "SYS.h"
3344+#ifndef SYS_msgsnd
55+#error "SYS_msgsnd not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__msgsnd, msgsnd, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl msgsnd$UNIX2003
615 msgsnd$UNIX2003 = __msgsnd
+9
src/kernel/libsyscall/sys_i386/poll.S
···11#define __SYSCALL_32BIT_ARG_BYTES 12
22#include "SYS.h"
3344+#ifndef SYS_poll
55+#error "SYS_poll not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__poll, poll, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl poll$UNIX2003
615 poll$UNIX2003 = __poll
+9
src/kernel/libsyscall/sys_i386/pread.S
···11#define __SYSCALL_32BIT_ARG_BYTES 20
22#include "SYS.h"
3344+#ifndef SYS_pread
55+#error "SYS_pread not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__pread, pread, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl pread$UNIX2003
615 pread$UNIX2003 = __pread
+9
src/kernel/libsyscall/sys_i386/pwrite.S
···11#define __SYSCALL_32BIT_ARG_BYTES 20
22#include "SYS.h"
3344+#ifndef SYS_pwrite
55+#error "SYS_pwrite not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__pwrite, pwrite, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl pwrite$UNIX2003
615 pwrite$UNIX2003 = __pwrite
+9
src/kernel/libsyscall/sys_i386/read.S
···11#define __SYSCALL_32BIT_ARG_BYTES 12
22#include "SYS.h"
3344+#ifndef SYS_read
55+#error "SYS_read not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__read, read, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl read$UNIX2003
615 read$UNIX2003 = __read
+9
src/kernel/libsyscall/sys_i386/readv.S
···11#define __SYSCALL_32BIT_ARG_BYTES 12
22#include "SYS.h"
3344+#ifndef SYS_readv
55+#error "SYS_readv not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__readv, readv, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl readv$UNIX2003
615 readv$UNIX2003 = __readv
+9
src/kernel/libsyscall/sys_i386/sem_wait.S
···11#define __SYSCALL_32BIT_ARG_BYTES 4
22#include "SYS.h"
3344+#ifndef SYS_sem_wait
55+#error "SYS_sem_wait not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__sem_wait, sem_wait, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl sem_wait$UNIX2003
615 sem_wait$UNIX2003 = __sem_wait
+9
src/kernel/libsyscall/sys_i386/waitid.S
···11#define __SYSCALL_32BIT_ARG_BYTES 16
22#include "SYS.h"
3344+#ifndef SYS_waitid
55+#error "SYS_waitid not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__waitid, waitid, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl waitid$UNIX2003
615 waitid$UNIX2003 = __waitid
+9
src/kernel/libsyscall/sys_i386/write.S
···11#define __SYSCALL_32BIT_ARG_BYTES 12
22#include "SYS.h"
3344+#ifndef SYS_write
55+#error "SYS_write not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__write, write, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl write$UNIX2003
615 write$UNIX2003 = __write
+9
src/kernel/libsyscall/sys_i386/writev.S
···11#define __SYSCALL_32BIT_ARG_BYTES 12
22#include "SYS.h"
3344+#ifndef SYS_writev
55+#error "SYS_writev not defined. The header files libsyscall is building against do not match syscalls.master."
66+#endif
77+88+#if defined(__i386__)
99+__SYSCALL2(__writev, writev, 1, cerror)
1010+#endif
1111+1212+413#if defined(__i386__)
514 .globl writev$UNIX2003
615 writev$UNIX2003 = __writev
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
34 *
···28292930#include <machine/cpu_capabilities.h>
3031#include <platfunc.h>
3232+3333+#ifdef DARLING
3434+# define _longcopy longcopy
3535+#endif
31363237/*
3338 * The bcopy/memcpy loops, tuned for Pentium-M class processors with