[kernel/libsyscall] Generate bsdsyscalls using xnu-7195.141.2 files

This commit is contained in:
Thomas A 2022-05-20 22:14:13 -07:00
parent fc97b2ad30
commit 653d430df8
432 changed files with 11778 additions and 0 deletions

View File

@ -0,0 +1,525 @@
/*
* Copyright (c) 1999-2011 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
*
* File: SYS.h
*
* Definition of the user side of the UNIX system call interface
* for M98K.
*
* Errors are flagged by the location of the trap return (ie., which
* instruction is executed upon rfi):
*
* SC PC + 4: Error (typically branch to cerror())
* SC PC + 8: Success
*
* HISTORY
* 18-Nov-92 Ben Fathi (benf@next.com)
* Ported to m98k.
*
* 9-Jan-92 Peter King (king@next.com)
* Created.
*/
#include <sys/syscall.h>
#if defined(__i386__)
#include <architecture/i386/asm_help.h>
#include <mach/i386/syscall_sw.h>
/*
* We have two entry points. int's is used for syscalls which need to preserve
* %ecx across the call, or return a 64-bit value in %eax:%edx. sysenter is used
* for the majority of syscalls which just return a value in %eax.
*/
#ifdef DARLING
#define UNIX_SYSCALL_SYSENTER call __darling_bsd_syscall
#else
#define UNIX_SYSCALL_SYSENTER call __sysenter_trap
#endif
#define UNIX_SYSCALL(name, nargs) \
.globl tramp_cerror ;\
LEAF(_##name, 0) ;\
movl $ SYS_##name, %eax ;\
UNIX_SYSCALL_SYSENTER ;\
jnb 2f ;\
BRANCH_EXTERN(tramp_cerror) ;\
2:
#define UNIX_SYSCALL_INT(name, nargs) \
.globl tramp_cerror ;\
LEAF(_##name, 0) ;\
movl $ SYS_##name, %eax ;\
UNIX_SYSCALL_TRAP ;\
jnb 2f ;\
BRANCH_EXTERN(tramp_cerror) ;\
2:
#if defined(__SYSCALL_32BIT_ARG_BYTES) && ((__SYSCALL_32BIT_ARG_BYTES >= 4) && (__SYSCALL_32BIT_ARG_BYTES <= 20))
#define UNIX_SYSCALL_NONAME(name, nargs, cerror) \
movl $(SYS_##name | (__SYSCALL_32BIT_ARG_BYTES << I386_SYSCALL_ARG_BYTES_SHIFT)), %eax ;\
UNIX_SYSCALL_SYSENTER ;\
jnb 2f ;\
BRANCH_EXTERN(tramp_##cerror) ;\
2:
#else /* __SYSCALL_32BIT_ARG_BYTES < 4 || > 20 */
#define UNIX_SYSCALL_NONAME(name, nargs, cerror) \
movl $ SYS_##name, %eax ;\
UNIX_SYSCALL_SYSENTER ;\
jnb 2f ;\
BRANCH_EXTERN(tramp_##cerror) ;\
2:
#endif
#define UNIX_SYSCALL_INT_NONAME(name, nargs) \
.globl tramp_cerror_nocancel ;\
movl $ SYS_##name, %eax ;\
UNIX_SYSCALL_TRAP ;\
jnb 2f ;\
BRANCH_EXTERN(tramp_cerror_nocancel) ;\
2:
#define PSEUDO(pseudo, name, nargs, cerror) \
LEAF(pseudo, 0) ;\
UNIX_SYSCALL_NONAME(name, nargs, cerror)
#define PSEUDO_INT(pseudo, name, nargs) \
LEAF(pseudo, 0) ;\
UNIX_SYSCALL_INT_NONAME(name, nargs)
#define __SYSCALL2(pseudo, name, nargs, cerror) \
PSEUDO(pseudo, name, nargs, cerror) ;\
ret
#define __SYSCALL(pseudo, name, nargs) \
PSEUDO(pseudo, name, nargs, cerror) ;\
ret
#define __SYSCALL_INT(pseudo, name, nargs) \
PSEUDO_INT(pseudo, name, nargs) ;\
ret
#elif defined(__x86_64__)
#include <architecture/i386/asm_help.h>
#include <mach/i386/syscall_sw.h>
#ifdef DARLING
#define UNIX_SYSCALL(name, nargs) \
.globl cerror ;\
LEAF(_#name, 0) ;\
movl $ SYS_##name, %eax ;\
call __darling_bsd_syscall ;\
cmpq $-4095, %rax ;\
jb 2f ;\
movq %rax, %rdi ;\
negq %rdi ;\
BRANCH_EXTERN(_cerror) ;\
2:
#define UNIX_SYSCALL_NONAME(name, nargs, cerror) \
.globl cerror ;\
movl $ SYS_##name, %eax ;\
call __darling_bsd_syscall ;\
cmpq $-4095, %rax ;\
jb 2f ;\
movq %rax, %rdi ;\
negq %rdi ;\
BRANCH_EXTERN(_##cerror) ;\
2:
#else
#define UNIX_SYSCALL_SYSCALL \
movq %rcx, %r10 ;\
syscall
#define UNIX_SYSCALL(name, nargs) \
.globl cerror ;\
LEAF(_##name, 0) ;\
movl $ SYSCALL_CONSTRUCT_UNIX(SYS_##name), %eax ;\
UNIX_SYSCALL_SYSCALL ;\
jnb 2f ;\
movq %rax, %rdi ;\
BRANCH_EXTERN(_cerror) ;\
2:
#define UNIX_SYSCALL_NONAME(name, nargs, cerror) \
.globl cerror ;\
movl $ SYSCALL_CONSTRUCT_UNIX(SYS_##name), %eax ;\
UNIX_SYSCALL_SYSCALL ;\
jnb 2f ;\
movq %rax, %rdi ;\
BRANCH_EXTERN(_##cerror) ;\
2:
#endif
#define PSEUDO(pseudo, name, nargs, cerror) \
LEAF(pseudo, 0) ;\
UNIX_SYSCALL_NONAME(name, nargs, cerror)
#define __SYSCALL2(pseudo, name, nargs, cerror) \
PSEUDO(pseudo, name, nargs, cerror) ;\
ret
#define __SYSCALL(pseudo, name, nargs) \
PSEUDO(pseudo, name, nargs, cerror) ;\
ret
#elif defined(__arm__)
#include <architecture/arm/asm_help.h>
#include <mach/arm/syscall_sw.h>
/*
* ARM system call interface:
*
* swi 0x80
* args: r0-r6
* return code: r0
* on error, carry bit is set in the psr, otherwise carry bit is cleared.
*/
/*
* Macros.
*/
/*
* until we update the architecture project, these live here
*/
#if defined(__DYNAMIC__)
#define MI_GET_ADDRESS(reg,var) \
ldr reg, 4f ;\
3: ldr reg, [pc, reg] ;\
b 5f ;\
4: .long 6f - (3b + 8) ;\
5: ;\
.non_lazy_symbol_pointer ;\
6: ;\
.indirect_symbol var ;\
.long 0 ;\
.text ;\
.align 2
#else
#define MI_GET_ADDRESS(reg,var) \
ldr reg, 3f ;\
b 4f ;\
3: .long var ;\
4:
#endif
#if defined(__DYNAMIC__)
#define MI_BRANCH_EXTERNAL(var) \
.globl var ;\
MI_GET_ADDRESS(ip, var) ;\
bx ip
#else
#define MI_BRANCH_EXTERNAL(var) ;\
.globl var ;\
b var
#endif
#if defined(__DYNAMIC__)
#define MI_CALL_EXTERNAL(var) \
.globl var ;\
MI_GET_ADDRESS(ip,var) ;\
blx ip
#else
#define MI_CALL_EXTERNAL(var) \
.globl var ;\
bl var
#endif
#define MI_ENTRY_POINT(name) \
.text ;\
.align 2 ;\
.globl name ;\
name:
/* load the syscall number into r12 and trap */
#define DO_SYSCALL(num) \
.if (((num) & 0xff) == (num)) ;\
mov r12, #(num) ;\
.elseif (((num) & 0x3fc) == (num)) ;\
mov r12, #(num) ;\
.else ;\
mov r12, #((num) & 0xffffff00) /* top half of the syscall number */ ;\
orr r12, r12, #((num) & 0xff) /* bottom half */ ;\
.endif ;\
swi #SWI_SYSCALL
/* simple syscalls (0 to 4 args) */
#define SYSCALL_0to4(name, cerror) \
MI_ENTRY_POINT(_##name) ;\
DO_SYSCALL(SYS_##name) ;\
bxcc lr /* return if carry is clear (no error) */ ; \
1: MI_BRANCH_EXTERNAL(_##cerror)
/* syscalls with 5 args is different, because of the single arg register load */
#define SYSCALL_5(name, cerror) \
MI_ENTRY_POINT(_##name) ;\
mov ip, sp /* save a pointer to the args */ ; \
stmfd sp!, { r4-r5 } /* save r4-r5 */ ;\
ldr r4, [ip] /* load 5th arg */ ; \
DO_SYSCALL(SYS_##name) ;\
ldmfd sp!, { r4-r5 } /* restore r4-r5 */ ; \
bxcc lr /* return if carry is clear (no error) */ ; \
1: MI_BRANCH_EXTERNAL(_##cerror)
/* syscalls with 6 to 12 args. kernel may have to read from stack */
#define SYSCALL_6to12(name, save_regs, arg_regs, cerror) \
MI_ENTRY_POINT(_##name) ;\
mov ip, sp /* save a pointer to the args */ ; \
stmfd sp!, { save_regs } /* callee saved regs */ ;\
ldmia ip, { arg_regs } /* load arg regs */ ; \
DO_SYSCALL(SYS_##name) ;\
ldmfd sp!, { save_regs } /* restore callee saved regs */ ; \
bxcc lr /* return if carry is clear (no error) */ ; \
1: MI_BRANCH_EXTERNAL(_##cerror)
#define COMMA ,
#if __BIGGEST_ALIGNMENT__ > 4
/* For the armv7k ABI, the alignment requirements may add padding. So we
* let the kernel figure it out and push extra on the stack to avoid un-needed
* copy-ins */
/* We'll also use r8 for moving arguments */
#define SYSCALL_0(name) SYSCALL_0to4(name)
#define SYSCALL_1(name) SYSCALL_0to4(name)
#define SYSCALL_2(name) SYSCALL_0to4(name)
#define SYSCALL_3(name) SYSCALL_0to4(name)
#define SYSCALL_4(name) SYSCALL_6to12(name, r4-r5, r4-r5)
#undef SYSCALL_5
#define SYSCALL_5(name) SYSCALL_6to12(name, r4-r5, r4-r5)
#define SYSCALL_6(name) SYSCALL_6to12(name, r4-r6 COMMA r8, r4-r6 COMMA r8)
#define SYSCALL_7(name) SYSCALL_6to12(name, r4-r6 COMMA r8, r4-r6 COMMA r8)
#define SYSCALL_8(name) SYSCALL_6to12(name, r4-r6 COMMA r8, r4-r6 COMMA r8)
#define SYSCALL_12(name) SYSCALL_6to12(name, r4-r6 COMMA r8, r4-r6 COMMA r8)
#else // !(__BIGGEST_ALIGNMENT__ > 4) (the normal arm32 ABI case)
#define SYSCALL_0(name) SYSCALL_0to4(name)
#define SYSCALL_1(name) SYSCALL_0to4(name)
#define SYSCALL_2(name) SYSCALL_0to4(name)
#define SYSCALL_3(name) SYSCALL_0to4(name)
#define SYSCALL_4(name) SYSCALL_0to4(name)
/* SYSCALL_5 declared above */
#define SYSCALL_6(name) SYSCALL_6to12(name, r4-r5, r4-r5)
#define SYSCALL_7(name) SYSCALL_6to12(name, r4-r6 COMMA r8, r4-r6)
#define SYSCALL_8(name) SYSCALL_6to12(name, r4-r6 COMMA r8, r4-r6) /* 8th on stack */
#define SYSCALL_12(name) SYSCALL_6to12(name, r4-r6 COMMA r8, r4-r6) /* 8th-12th on stack */
#endif // __BIGGEST_ALIGNMENT__ > 4
/* select the appropriate syscall code, based on the number of arguments */
#ifndef __SYSCALL_32BIT_ARG_BYTES
#define SYSCALL(name, nargs, cerror) SYSCALL_##nargs(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_##nargs(name, cerror)
#else
#if __SYSCALL_32BIT_ARG_BYTES < 20
#define SYSCALL(name, nargs, cerror) SYSCALL_0to4(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_0to4(name, cerror)
#elif __SYSCALL_32BIT_ARG_BYTES == 20
#define SYSCALL(name, nargs, cerror) SYSCALL_5(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_5(name, cerror)
#elif __SYSCALL_32BIT_ARG_BYTES == 24
#define SYSCALL(name, nargs, cerror) SYSCALL_6(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_6(name, cerror)
#elif __SYSCALL_32BIT_ARG_BYTES == 28
#define SYSCALL(name, nargs, cerror) SYSCALL_7(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_7(name, cerror)
#elif __SYSCALL_32BIT_ARG_BYTES == 32
#define SYSCALL(name, nargs, cerror) SYSCALL_8(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_8(name, cerror)
#elif __SYSCALL_32BIT_ARG_BYTES == 36
#define SYSCALL(name, nargs, cerror) SYSCALL_8(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_8(name, cerror)
#elif __SYSCALL_32BIT_ARG_BYTES == 40
#define SYSCALL(name, nargs, cerror) SYSCALL_8(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_8(name, cerror)
#elif __SYSCALL_32BIT_ARG_BYTES == 44
#define SYSCALL(name, nargs, cerror) SYSCALL_8(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_8(name, cerror)
#elif __SYSCALL_32BIT_ARG_BYTES == 48
#define SYSCALL(name, nargs, cerror) SYSCALL_12(name, cerror)
#define SYSCALL_NONAME(name, nargs, cerror) SYSCALL_NONAME_12(name, cerror)
#endif
#endif
#define SYSCALL_NONAME_0to4(name, cerror) \
DO_SYSCALL(SYS_##name) ;\
bcc 1f /* branch if carry bit is clear (no error) */ ; \
MI_BRANCH_EXTERNAL(_##cerror) /* call cerror */ ; \
1:
#define SYSCALL_NONAME_5(name, cerror) \
mov ip, sp /* save a pointer to the args */ ; \
stmfd sp!, { r4-r5 } /* save r4-r5 */ ;\
ldr r4, [ip] /* load 5th arg */ ; \
DO_SYSCALL(SYS_##name) ;\
ldmfd sp!, { r4-r5 } /* restore r4-r7 */ ; \
bcc 1f /* branch if carry bit is clear (no error) */ ; \
MI_BRANCH_EXTERNAL(_##cerror) /* call cerror */ ; \
1:
#define SYSCALL_NONAME_6to12(name, save_regs, arg_regs, cerror) \
mov ip, sp /* save a pointer to the args */ ; \
stmfd sp!, { save_regs } /* callee save regs */ ;\
ldmia ip, { arg_regs } /* load arguments */ ; \
DO_SYSCALL(SYS_##name) ;\
ldmfd sp!, { save_regs } /* restore callee saved regs */ ; \
bcc 1f /* branch if carry bit is clear (no error) */ ; \
MI_BRANCH_EXTERNAL(_##cerror) /* call cerror */ ; \
1:
#if __BIGGEST_ALIGNMENT__ > 4
/* For the armv7k ABI, the alignment requirements may add padding. So we
* let the kernel figure it out and push extra on the stack to avoid un-needed
* copy-ins. We are relying on arguments that aren't in registers starting
* 32 bytes from sp. We also use r8 like in the mach case. */
#define SYSCALL_NONAME_0(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
#define SYSCALL_NONAME_1(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
#define SYSCALL_NONAME_2(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
#define SYSCALL_NONAME_3(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
#define SYSCALL_NONAME_4(name, cerror) SYSCALL_NONAME_6to12(name, r4-r5, r4-r5, cerror)
#undef SYSCALL_NONAME_5
#define SYSCALL_NONAME_5(name, cerror) SYSCALL_NONAME_6to12(name, r4-r5, r4-r5, cerror)
#define SYSCALL_NONAME_6(name, cerror) SYSCALL_NONAME_6to12(name, r4-r6 COMMA r8, r4-r6 COMMA r8, cerror)
#define SYSCALL_NONAME_7(name, cerror) SYSCALL_NONAME_6to12(name, r4-r6 COMMA r8, r4-r6 COMMA r8, cerror)
#define SYSCALL_NONAME_8(name, cerror) SYSCALL_NONAME_6to12(name, r4-r6 COMMA r8, r4-r6 COMMA r8, cerror)
#define SYSCALL_NONAME_12(name, cerror) SYSCALL_NONAME_6to12(name, r4-r6 COMMA r8, r4-r6 COMMA r8, cerror)
#else // !(__BIGGEST_ALIGNMENT__ > 4) (the normal arm32 ABI case)
#define SYSCALL_NONAME_0(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
#define SYSCALL_NONAME_1(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
#define SYSCALL_NONAME_2(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
#define SYSCALL_NONAME_3(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
#define SYSCALL_NONAME_4(name, cerror) SYSCALL_NONAME_0to4(name, cerror)
/* SYSCALL_NONAME_5 declared above */
#define SYSCALL_NONAME_6(name, cerror) SYSCALL_NONAME_6to12(name, r4-r5, r4-r5, cerror)
#define SYSCALL_NONAME_7(name, cerror) SYSCALL_NONAME_6to12(name, r4-r6 COMMA r8, r4-r6, cerror)
#define SYSCALL_NONAME_8(name, cerror) SYSCALL_NONAME_6to12(name, r4-r6 COMMA r8, r4-r6, cerror)
#define SYSCALL_NONAME_12(name, cerror) SYSCALL_NONAME_6to12(name, r4-r6 COMMA r8, r4-r6, cerror)
#endif // __BIGGEST_ALIGNMENT__ > 4
#define PSEUDO(pseudo, name, nargs, cerror) \
.globl pseudo ;\
.text ;\
.align 2 ;\
pseudo: ;\
SYSCALL_NONAME(name, nargs, cerror)
#define __SYSCALL2(pseudo, name, nargs, cerror) \
PSEUDO(pseudo, name, nargs, cerror) ;\
bx lr
#define __SYSCALL(pseudo, name, nargs) \
PSEUDO(pseudo, name, nargs, cerror) ;\
bx lr
#elif defined(__arm64__)
#include <mach/arm/syscall_sw.h>
#include <mach/arm/vm_param.h>
#include <mach/arm64/asm.h>
#if defined(__arm64__) && !defined(__LP64__)
#define ZERO_EXTEND(argnum) uxtw x ## argnum, w ## argnum
#else
#define ZERO_EXTEND(argnum)
#endif
#if defined(__arm64__) && !defined(__LP64__)
#define SIGN_EXTEND(argnum) sxtw x ## argnum, w ## argnum
#else
#define SIGN_EXTEND(argnum)
#endif
/*
* ARM64 system call interface:
*
* TBD
*/
#define DO_SYSCALL(num, cerror) \
mov x16, #(num) %%\
svc #SWI_SYSCALL %%\
b.cc 2f %%\
ARM64_STACK_PROLOG %%\
PUSH_FRAME %%\
bl _##cerror %%\
POP_FRAME %%\
ARM64_STACK_EPILOG %%\
2:
#define MI_GET_ADDRESS(reg,var) \
adrp reg, var@page %%\
add reg, reg, var@pageoff %%
#define MI_CALL_EXTERNAL(sym) \
.globl sym %% \
bl sym
#define SYSCALL_NONAME(name, nargs, cerror) \
DO_SYSCALL(SYS_##name, cerror) %% \
1:
#define MI_ENTRY_POINT(name) \
.text %% \
.align 2 %% \
.globl name %% \
name:
#define PSEUDO(pseudo, name, nargs, cerror) \
.text %% \
.align 2 %% \
.globl pseudo %% \
pseudo: %% \
SYSCALL_NONAME(name, nargs, cerror)
#define __SYSCALL(pseudo, name, nargs) \
PSEUDO(pseudo, name, nargs, cerror) %% \
ret
#define __SYSCALL2(pseudo, name, nargs, cerror) \
PSEUDO(pseudo, name, nargs, cerror) %% \
ret
#else
#error Unsupported architecture
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS___old_semwait_signal_nocancel
#error "SYS___old_semwait_signal_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(_____old_semwait_signal_nocancel)
SYSCALL_NONAME(__old_semwait_signal_nocancel, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(_____old_semwait_signal_nocancel, __old_semwait_signal_nocancel, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___sigwait_nocancel
#error "SYS___sigwait_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(_____sigwait_nocancel)
SYSCALL_NONAME(__sigwait_nocancel, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(_____sigwait_nocancel, __sigwait_nocancel, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 32
#include "SYS.h"
#ifndef SYS_abort_with_payload
#error "SYS_abort_with_payload not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___abort_with_payload)
SYSCALL_NONAME(abort_with_payload, 6, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___abort_with_payload, abort_with_payload, 6, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_accept
#error "SYS_accept not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___accept)
SYSCALL_NONAME(accept, 3, cerror)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___accept, accept, 3, cerror)
#endif
#endif
#if defined(__i386__)
.globl _accept$UNIX2003
.set _accept$UNIX2003, ___accept
#endif
#if defined(__x86_64__)
.globl _accept
.set _accept, ___accept
#endif
#if defined(__ppc__)
.globl _accept$UNIX2003
.set _accept$UNIX2003, ___accept
#endif
#if defined(__arm64__)
.globl _accept
.set _accept, ___accept
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_accept_nocancel
#error "SYS_accept_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___accept_nocancel)
SYSCALL_NONAME(accept_nocancel, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___accept_nocancel, accept_nocancel, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _accept$NOCANCEL$UNIX2003
.set _accept$NOCANCEL$UNIX2003, ___accept_nocancel
#endif
#if defined(__x86_64__)
.globl _accept$NOCANCEL
.set _accept$NOCANCEL, ___accept_nocancel
#endif
#if defined(__ppc__)
.globl _accept$NOCANCEL$UNIX2003
.set _accept$NOCANCEL$UNIX2003, ___accept_nocancel
#endif
#if defined(__arm64__)
.globl _accept$NOCANCEL
.set _accept$NOCANCEL, ___accept_nocancel
#endif

View File

@ -0,0 +1,39 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_access_extended
#error "SYS_access_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___access_extended)
ZERO_EXTEND(1)
SYSCALL_NONAME(access_extended, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___access_extended, access_extended, 4, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _accessx_np
.set _accessx_np, ___access_extended
#endif
#if defined(__x86_64__)
.globl _accessx_np
.set _accessx_np, ___access_extended
#endif
#if defined(__ppc__)
.globl _accessx_np
.set _accessx_np, ___access_extended
#endif
#if defined(__arm64__)
.globl _accessx_np
.set _accessx_np, ___access_extended
#endif

View File

@ -0,0 +1,42 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_aio_suspend_nocancel
#error "SYS_aio_suspend_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___aio_suspend_nocancel)
SYSCALL_NONAME(aio_suspend_nocancel, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___aio_suspend_nocancel, aio_suspend_nocancel, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _aio_suspend
.set _aio_suspend, ___aio_suspend_nocancel
.globl _aio_suspend$NOCANCEL$UNIX2003
.set _aio_suspend$NOCANCEL$UNIX2003, ___aio_suspend_nocancel
#endif
#if defined(__x86_64__)
.globl _aio_suspend$NOCANCEL
.set _aio_suspend$NOCANCEL, ___aio_suspend_nocancel
#endif
#if defined(__ppc__)
.globl _aio_suspend
.set _aio_suspend, ___aio_suspend_nocancel
.globl _aio_suspend$NOCANCEL$UNIX2003
.set _aio_suspend$NOCANCEL$UNIX2003, ___aio_suspend_nocancel
#endif
#if defined(__arm64__)
.globl _aio_suspend$NOCANCEL
.set _aio_suspend$NOCANCEL, ___aio_suspend_nocancel
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_bind
#error "SYS_bind not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___bind)
SYSCALL_NONAME(bind, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___bind, bind, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _bind$UNIX2003
.set _bind$UNIX2003, ___bind
#endif
#if defined(__x86_64__)
.globl _bind
.set _bind, ___bind
#endif
#if defined(__ppc__)
.globl _bind$UNIX2003
.set _bind$UNIX2003, ___bind
#endif
#if defined(__arm64__)
.globl _bind
.set _bind, ___bind
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_bsdthread_create
#error "SYS_bsdthread_create not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___bsdthread_create)
SYSCALL_NONAME(bsdthread_create, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___bsdthread_create, bsdthread_create, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_bsdthread_ctl
#error "SYS_bsdthread_ctl not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___bsdthread_ctl)
SYSCALL_NONAME(bsdthread_ctl, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___bsdthread_ctl, bsdthread_ctl, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 28
#include "SYS.h"
#ifndef SYS_bsdthread_register
#error "SYS_bsdthread_register not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___bsdthread_register)
SYSCALL_NONAME(bsdthread_register, 7, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___bsdthread_register, bsdthread_register, 7, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,19 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_bsdthread_terminate
#error "SYS_bsdthread_terminate not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___bsdthread_terminate)
ZERO_EXTEND(1)
SYSCALL_NONAME(bsdthread_terminate, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___bsdthread_terminate, bsdthread_terminate, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,28 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_chmod
#error "SYS_chmod not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___chmod)
SYSCALL_NONAME(chmod, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___chmod, chmod, 2, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _chmod
.set _chmod, ___chmod
#endif
#if defined(__ppc__)
.globl _chmod
.set _chmod, ___chmod
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_chmod_extended
#error "SYS_chmod_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___chmod_extended)
SYSCALL_NONAME(chmod_extended, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___chmod_extended, chmod_extended, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,42 @@
#define __SYSCALL_32BIT_ARG_BYTES 4
#include "SYS.h"
#ifndef SYS_close_nocancel
#error "SYS_close_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___close_nocancel)
SYSCALL_NONAME(close_nocancel, 1, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___close_nocancel, close_nocancel, 1, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _close
.set _close, ___close_nocancel
.globl _close$NOCANCEL$UNIX2003
.set _close$NOCANCEL$UNIX2003, ___close_nocancel
#endif
#if defined(__x86_64__)
.globl _close$NOCANCEL
.set _close$NOCANCEL, ___close_nocancel
#endif
#if defined(__ppc__)
.globl _close
.set _close, ___close_nocancel
.globl _close$NOCANCEL$UNIX2003
.set _close$NOCANCEL$UNIX2003, ___close_nocancel
#endif
#if defined(__arm64__)
.globl _close$NOCANCEL
.set _close$NOCANCEL, ___close_nocancel
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_coalition
#error "SYS_coalition not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___coalition)
SYSCALL_NONAME(coalition, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___coalition, coalition, 3, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_coalition_info
#error "SYS_coalition_info not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___coalition_info)
SYSCALL_NONAME(coalition_info, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___coalition_info, coalition_info, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_coalition_ledger
#error "SYS_coalition_ledger not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___coalition_ledger)
SYSCALL_NONAME(coalition_ledger, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___coalition_ledger, coalition_ledger, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_connect
#error "SYS_connect not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___connect)
SYSCALL_NONAME(connect, 3, cerror)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___connect, connect, 3, cerror)
#endif
#endif
#if defined(__i386__)
.globl _connect$UNIX2003
.set _connect$UNIX2003, ___connect
#endif
#if defined(__x86_64__)
.globl _connect
.set _connect, ___connect
#endif
#if defined(__ppc__)
.globl _connect$UNIX2003
.set _connect$UNIX2003, ___connect
#endif
#if defined(__arm64__)
.globl _connect
.set _connect, ___connect
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_connect_nocancel
#error "SYS_connect_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___connect_nocancel)
SYSCALL_NONAME(connect_nocancel, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___connect_nocancel, connect_nocancel, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _connect$NOCANCEL$UNIX2003
.set _connect$NOCANCEL$UNIX2003, ___connect_nocancel
#endif
#if defined(__x86_64__)
.globl _connect$NOCANCEL
.set _connect$NOCANCEL, ___connect_nocancel
#endif
#if defined(__ppc__)
.globl _connect$NOCANCEL$UNIX2003
.set _connect$NOCANCEL$UNIX2003, ___connect_nocancel
#endif
#if defined(__arm64__)
.globl _connect$NOCANCEL
.set _connect$NOCANCEL, ___connect_nocancel
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_copyfile
#error "SYS_copyfile not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___copyfile)
SYSCALL_NONAME(copyfile, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___copyfile, copyfile, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_csrctl
#error "SYS_csrctl not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___csrctl)
SYSCALL_NONAME(csrctl, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___csrctl, csrctl, 3, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 4
#include "SYS.h"
#ifndef SYS_delete
#error "SYS_delete not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___delete)
SYSCALL_NONAME(delete, 1, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___delete, delete, 1, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 4
#include "SYS.h"
#ifndef SYS___disable_threadsignal
#error "SYS___disable_threadsignal not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___disable_threadsignal)
SYSCALL_NONAME(__disable_threadsignal, 1, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___disable_threadsignal, __disable_threadsignal, 1, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 4
#include "SYS.h"
#ifndef SYS_exit
#error "SYS_exit not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___exit)
SYSCALL_NONAME(exit, 1, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___exit, exit, 1, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl __exit
.set __exit, ___exit
#endif
#if defined(__x86_64__)
.globl __exit
.set __exit, ___exit
#endif
#if defined(__ppc__)
.globl __exit
.set __exit, ___exit
#endif
#if defined(__arm64__)
.globl __exit
.set __exit, ___exit
#endif

View File

@ -0,0 +1,28 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_fchmod
#error "SYS_fchmod not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___fchmod)
SYSCALL_NONAME(fchmod, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___fchmod, fchmod, 2, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _fchmod
.set _fchmod, ___fchmod
#endif
#if defined(__ppc__)
.globl _fchmod
.set _fchmod, ___fchmod
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_fchmod_extended
#error "SYS_fchmod_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___fchmod_extended)
SYSCALL_NONAME(fchmod_extended, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___fchmod_extended, fchmod_extended, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,29 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_fcntl
#error "SYS_fcntl not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___fcntl)
SIGN_EXTEND(2)
SYSCALL_NONAME(fcntl, 3, cerror)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___fcntl, fcntl, 3, cerror)
#endif
#endif
#if defined(__i386__)
.globl _fcntl$UNIX2003
.set _fcntl$UNIX2003, ___fcntl
#endif
#if defined(__ppc__)
.globl _fcntl$UNIX2003
.set _fcntl$UNIX2003, ___fcntl
#endif

View File

@ -0,0 +1,33 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_fcntl_nocancel
#error "SYS_fcntl_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___fcntl_nocancel)
SIGN_EXTEND(2)
SYSCALL_NONAME(fcntl_nocancel, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___fcntl_nocancel, fcntl_nocancel, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _fcntl
.set _fcntl, ___fcntl_nocancel
.globl _fcntl$NOCANCEL$UNIX2003
.set _fcntl$NOCANCEL$UNIX2003, ___fcntl_nocancel
#endif
#if defined(__ppc__)
.globl _fcntl
.set _fcntl, ___fcntl_nocancel
.globl _fcntl$NOCANCEL$UNIX2003
.set _fcntl$NOCANCEL$UNIX2003, ___fcntl_nocancel
#endif

View File

@ -0,0 +1,177 @@
/*
* Copyright (c) 1999-2010 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
*
* File: libc/ppc/sys/fork.s
*
* HISTORY
* 18-Nov-92 Ben Fathi (benf@next.com)
* Created from M88K sources
*
* 11-Jan-92 Peter King (king@next.com)
* Created from M68K sources
*/
/*
* All of the asm stubs in this file have been adjusted so the pre/post
* fork handlers and dyld fixup are done in C inside Libc. As such, Libc
* expects the __fork asm to fix up the return code to be -1, 0 or pid
* and errno if needed.
*/
#include "SYS.h"
#if defined(__i386__)
LEAF(___fork, 0)
subl $28, %esp // Align the stack, with 16 bytes of extra padding that we'll need
movl $ SYS_fork,%eax; // code for fork -> eax
#ifdef DARLING
call __darling_bsd_syscall
cmpl $0, %eax
jnb L1
#else
UNIX_SYSCALL_TRAP // do the system call
jnc L1 // jump if CF==0
#endif
CALL_EXTERN(tramp_cerror)
movl $-1,%eax
addl $28, %esp // restore the stack
ret
L1:
orl %edx,%edx // CF=OF=0, ZF set if zero result
jz L2 // parent, since r1 == 0 in parent, 1 in child
//child here...
xorl %eax,%eax // zero eax
REG_TO_EXTERN(%eax, __current_pid);
L2:
addl $28, %esp // restore the stack
// parent ends up here skipping child portion
ret
#elif defined(__x86_64__)
LEAF(___fork, 0)
subq $24, %rsp // Align the stack, plus room for local storage
#ifdef DARLING
movl $ SYS_fork, %eax
call __darling_bsd_syscall
cmpq $0, %rax
jnb L1
#else
movl $ SYSCALL_CONSTRUCT_UNIX(SYS_fork),%eax; // code for fork -> rax
UNIX_SYSCALL_TRAP // do the system call
jnc L1 // jump if CF==0
#endif
movq %rax, %rdi
CALL_EXTERN(_cerror)
movq $-1, %rax
addq $24, %rsp // restore the stack
ret
L1:
#ifdef DARLING
testl %eax, %eax
jnz L2
#else
orl %edx,%edx // CF=OF=0, ZF set if zero result
jz L2 // parent, since r1 == 0 in parent, 1 in child
#endif
//child here...
xorq %rax, %rax
PICIFY(__current_pid)
movl %eax,(%r11)
L2:
// parent ends up here skipping child portion
addq $24, %rsp // restore the stack
ret
#elif defined(__arm__)
MI_ENTRY_POINT(___fork)
stmfd sp!, {r4, r7, lr}
add r7, sp, #4
mov r1, #1 // prime results
mov r12, #SYS_fork
swi #SWI_SYSCALL // make the syscall
bcs Lbotch // error?
cmp r1, #0 // parent (r1=0) or child(r1=1)
beq Lparent
//child here...
MI_GET_ADDRESS(r3, __current_pid)
mov r0, #0
str r0, [r3] // clear cached pid in child
ldmfd sp!, {r4, r7, pc}
Lbotch:
MI_CALL_EXTERNAL(_cerror) // jump here on error
mov r0,#-1 // set the error
// fall thru
Lparent:
ldmfd sp!, {r4, r7, pc} // pop and return
#elif defined(__arm64__)
#include <mach/arm64/asm.h>
MI_ENTRY_POINT(___fork)
ARM64_STACK_PROLOG
PUSH_FRAME
// ARM moves a 1 in to r1 here, but I can't see why.
mov x16, #SYS_fork // Syscall code
svc #SWI_SYSCALL // Trap to kernel
b.cs Lbotch // Carry bit indicates failure
cbz x1, Lparent // x1 == 0 indicates that we are the parent
// Child
MI_GET_ADDRESS(x9, __current_pid) // Get address of cached "current pid"
mov w0, #0
str w0, [x9] // Clear cached current pid
POP_FRAME // And done
ARM64_STACK_EPILOG
Lbotch:
MI_CALL_EXTERNAL(_cerror) // Handle error
mov w0, #-1 // Return value is -1
Lparent:
POP_FRAME // Return
ARM64_STACK_EPILOG
#else
#error Unsupported architecture
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 24
#include "SYS.h"
#ifndef SYS_fs_snapshot
#error "SYS_fs_snapshot not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___fs_snapshot)
SYSCALL_NONAME(fs_snapshot, 6, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___fs_snapshot, fs_snapshot, 6, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_fstat64_extended
#error "SYS_fstat64_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___fstat64_extended)
SYSCALL_NONAME(fstat64_extended, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___fstat64_extended, fstat64_extended, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_fstat_extended
#error "SYS_fstat_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___fstat_extended)
SYSCALL_NONAME(fstat_extended, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___fstat_extended, fstat_extended, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,42 @@
#define __SYSCALL_32BIT_ARG_BYTES 4
#include "SYS.h"
#ifndef SYS_fsync_nocancel
#error "SYS_fsync_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___fsync_nocancel)
SYSCALL_NONAME(fsync_nocancel, 1, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___fsync_nocancel, fsync_nocancel, 1, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _fsync
.set _fsync, ___fsync_nocancel
.globl _fsync$NOCANCEL$UNIX2003
.set _fsync$NOCANCEL$UNIX2003, ___fsync_nocancel
#endif
#if defined(__x86_64__)
.globl _fsync$NOCANCEL
.set _fsync$NOCANCEL, ___fsync_nocancel
#endif
#if defined(__ppc__)
.globl _fsync
.set _fsync, ___fsync_nocancel
.globl _fsync$NOCANCEL$UNIX2003
.set _fsync$NOCANCEL$UNIX2003, ___fsync_nocancel
#endif
#if defined(__arm64__)
.globl _fsync$NOCANCEL
.set _fsync$NOCANCEL, ___fsync_nocancel
#endif

View File

@ -0,0 +1,40 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_getattrlist
#error "SYS_getattrlist not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___getattrlist)
ZERO_EXTEND(4)
ZERO_EXTEND(3)
SYSCALL_NONAME(getattrlist, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___getattrlist, getattrlist, 5, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _getattrlist$UNIX2003
.set _getattrlist$UNIX2003, ___getattrlist
#endif
#if defined(__x86_64__)
.globl _getattrlist
.set _getattrlist, ___getattrlist
#endif
#if defined(__ppc__)
.globl _getattrlist$UNIX2003
.set _getattrlist$UNIX2003, ___getattrlist
#endif
#if defined(__arm64__)
.globl _getattrlist
.set _getattrlist, ___getattrlist
#endif

View File

@ -0,0 +1,19 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_getdirentries64
#error "SYS_getdirentries64 not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___getdirentries64)
ZERO_EXTEND(2)
SYSCALL_NONAME(getdirentries64, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___getdirentries64, getdirentries64, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_gethostuuid
#error "SYS_gethostuuid not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___gethostuuid)
SYSCALL_NONAME(gethostuuid, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___gethostuuid, gethostuuid, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_getlogin
#error "SYS_getlogin not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___getlogin)
SYSCALL_NONAME(getlogin, 2, cerror)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___getlogin, getlogin, 2, cerror)
#endif
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_getpeername
#error "SYS_getpeername not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___getpeername)
SYSCALL_NONAME(getpeername, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___getpeername, getpeername, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _getpeername$UNIX2003
.set _getpeername$UNIX2003, ___getpeername
#endif
#if defined(__x86_64__)
.globl _getpeername
.set _getpeername, ___getpeername
#endif
#if defined(__ppc__)
.globl _getpeername$UNIX2003
.set _getpeername$UNIX2003, ___getpeername
#endif
#if defined(__arm64__)
.globl _getpeername
.set _getpeername, ___getpeername
#endif

View File

@ -0,0 +1,193 @@
/*
* Copyright (c) 1999-2007 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
#include "SYS.h"
#if defined(__i386__)
.data
.private_extern __current_pid
L__current_pid_addr:
__current_pid:
.long 0
#if defined(__DYNAMIC__)
#define GET_CURRENT_PID \
call 0f ; \
0: ; \
popl %ecx ; \
leal L__current_pid_addr-0b(%ecx), %ecx
#define __current_pid (%ecx)
#else
#define GET_CURRENT_PID
#endif
/*
* If __current_pid is > 0, return it, else make syscall.
* If __current_pid is 0, cache result of syscall.
*/
TEXT
LEAF(___getpid, 0)
GET_CURRENT_PID
movl __current_pid, %eax
testl %eax, %eax
jle 1f
ret
1:
UNIX_SYSCALL_NONAME(getpid, 0, cerror_nocancel)
movl %eax, %edx
xorl %eax, %eax
GET_CURRENT_PID
lock
cmpxchgl %edx, __current_pid
movl %edx, %eax
ret
#elif defined(__x86_64__)
.data
.private_extern __current_pid
__current_pid:
.long 0
/*
* If __current_pid is > 0, return it, else make syscall.
* If __current_pid is 0, cache result of syscall.
*/
TEXT
LEAF(___getpid, 0)
movl __current_pid(%rip), %eax
testl %eax, %eax
jle 1f
ret
1:
UNIX_SYSCALL_NONAME(getpid, 0, cerror_nocancel)
movl %eax, %edx
xorl %eax, %eax
leaq __current_pid(%rip), %rcx
lock
cmpxchgl %edx, (%rcx)
movl %edx, %eax
ret
#elif defined(__arm__)
#include <arm/arch.h>
.data
.globl __current_pid
.align 2
__current_pid:
/* Cached pid. Possible values:
* 0: no value cached
* > 0: cached PID of current process
* < 0: negative number of vforks in progress
* INT_MIN: for pre-ARMv6, "looking" value (0x80000000)
*/
.long 0
MI_ENTRY_POINT(___getpid)
ldr r3, L__current_pid
L1: add r3, pc, r3 // r3 = &__current_pid
ldr r0, [r3] // get the cached pid
cmp r0, #0
bxgt lr // if positive, return it
SYSCALL_NONAME(getpid, 0, cerror_nocancel)
#ifdef _ARM_ARCH_6
ldrex r2, [r3] // see if we can cache it
cmp r2, #0 // we can't if there are any...
bxlt lr // ...vforks in progress
strex r2, r0, [r3] // ignore conflicts
#else
mov r1, #0x80000000 // load "looking" value
swp r2, r1, [r3] // look at the value, lock others out
cmp r2, r1 // anyone else trying to look?
bxeq lr // yes, so return immediately/
cmp r2, #0 // see if we can cache it
streq r0, [r3] // if zero, we can
strne r2, [r3] // otherwise restore previous value
#endif
bx lr
L__current_pid:
.long __current_pid - (L1+8)
#elif defined(__arm64__)
.data
.globl __current_pid
.align 2
__current_pid:
/* cached pid. possible values:
* 0: no value cached
* > 0: cached pid of current process
* < 0: negative number of vforks in progress
* int_min: for pre-armv6, "looking" value (0x80000000)
*/
.long 0
MI_ENTRY_POINT(___getpid)
MI_GET_ADDRESS(x9, __current_pid) // Get address of cached value
ldr w0, [x9] // Load it
cmp w0, #0 // See if there's a cached value
b.le L_notcached // If not, make syscall
ret // Else, we're done
L_notcached:
SYSCALL_NONAME(getpid, 0, cerror_nocancel)
ldxr w10, [x9] // Exclusive load
cbnz w10, L_done // Unless unset, don't even try
stxr wzr, w0, [x9] // Try to store, but don't care if we fail (someone will win, or not)
L_done:
ret // Done
#else
#error Unsupported architecture
#endif
#if defined(__i386__)
.globl _getpid
.set _getpid, ___getpid
#endif
#if defined(__x86_64__)
.globl _getpid
.set _getpid, ___getpid
#endif
#if defined(__ppc__)
.globl _getpid
.set _getpid, ___getpid
#endif
#if defined(__arm64__)
.globl _getpid
.set _getpid, ___getpid
#endif

View File

@ -0,0 +1,28 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_getrlimit
#error "SYS_getrlimit not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___getrlimit)
SYSCALL_NONAME(getrlimit, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___getrlimit, getrlimit, 2, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _getrlimit
.set _getrlimit, ___getrlimit
#endif
#if defined(__ppc__)
.globl _getrlimit
.set _getrlimit, ___getrlimit
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_getsgroups
#error "SYS_getsgroups not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___getsgroups)
SYSCALL_NONAME(getsgroups, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___getsgroups, getsgroups, 2, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _getsgroups_np
.set _getsgroups_np, ___getsgroups
#endif
#if defined(__x86_64__)
.globl _getsgroups_np
.set _getsgroups_np, ___getsgroups
#endif
#if defined(__ppc__)
.globl _getsgroups_np
.set _getsgroups_np, ___getsgroups
#endif
#if defined(__arm64__)
.globl _getsgroups_np
.set _getsgroups_np, ___getsgroups
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_getsockname
#error "SYS_getsockname not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___getsockname)
SYSCALL_NONAME(getsockname, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___getsockname, getsockname, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _getsockname$UNIX2003
.set _getsockname$UNIX2003, ___getsockname
#endif
#if defined(__x86_64__)
.globl _getsockname
.set _getsockname, ___getsockname
#endif
#if defined(__ppc__)
.globl _getsockname$UNIX2003
.set _getsockname$UNIX2003, ___getsockname
#endif
#if defined(__arm64__)
.globl _getsockname
.set _getsockname, ___getsockname
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_gettid
#error "SYS_gettid not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___gettid)
SYSCALL_NONAME(gettid, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___gettid, gettid, 2, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _pthread_getugid_np
.set _pthread_getugid_np, ___gettid
#endif
#if defined(__x86_64__)
.globl _pthread_getugid_np
.set _pthread_getugid_np, ___gettid
#endif
#if defined(__ppc__)
.globl _pthread_getugid_np
.set _pthread_getugid_np, ___gettid
#endif
#if defined(__arm64__)
.globl _pthread_getugid_np
.set _pthread_getugid_np, ___gettid
#endif

View File

@ -0,0 +1,120 @@
/*
* Copyright (c) 1999-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
#include "SYS.h"
/*
* A third argument, of type uint64_t*, was added to the gettimeofday syscall
* for use cases that also want to know the mach_absolute_time that matches the
* time value returned.
*
* __gettimeofday takes the traditional two arguments. It will zero out the
* third argument argument before entering the kernel, behaving like the old
* call.
*
* __gettimeofday_with_mach will pass it through and supporting kernels will
* copy-out the mach_absolute_time. Old kernels will leave the pointed to
* value alone.
*/
.private_extern ___gettimeofday_with_mach
#if defined(__i386__)
LABEL(___gettimeofday)
pushl $0
pushl 12(%esp)
pushl 12(%esp)
calll ___gettimeofday_with_mach
addl $12, %esp
ret
LABEL(___gettimeofday_with_mach)
UNIX_SYSCALL_INT_NONAME(gettimeofday,0)
/*
* <rdar://problem/26410029>
* If eax is 0, we're on a new kernel and timeval was written by the kernel.
* Otherwise, eax:edx contains the timeval and we marshal into timeval.
*/
cmp $0, %eax
je 2f
mov 4(%esp),%ecx
mov %eax,(%ecx)
mov %edx,4(%ecx)
xor %eax,%eax
2:
ret
#elif defined(__x86_64__)
__SYSCALL(___gettimeofday_with_mach, gettimeofday, 3)
LABEL(___gettimeofday)
movq $0x0, %rdx // zero out third argument
UNIX_SYSCALL_NONAME(gettimeofday,0,cerror_nocancel)
/*
* <rdar://problem/26410029>
* If rax is 0, we're on a new kernel and timeval was written by the kernel.
* Otherwise, rax:rdx contains the timeval and we marshal into timeval.
*/
cmp $0, %rax
je 2f
movq %rax, (%rdi)
movl %edx, 8(%rdi)
xorl %eax, %eax
2:
ret
#elif defined(__arm__)
__SYSCALL2(___gettimeofday_with_mach, gettimeofday, 3, cerror_nocancel)
.text
.align 2
.globl ___gettimeofday
___gettimeofday:
mov r2, #0x0
SYSCALL_NONAME(gettimeofday, 3, cerror_nocancel)
bx lr
#elif defined(__arm64__)
__SYSCALL2(___gettimeofday_with_mach, gettimeofday, 3, cerror_nocancel)
.text
.align 2
.globl ___gettimeofday
___gettimeofday:
movz x2, #0x0
SYSCALL_NONAME(gettimeofday, 3, cerror_nocancel)
ret
#else
#error Unsupported architecture
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_getwgroups
#error "SYS_getwgroups not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___getwgroups)
SYSCALL_NONAME(getwgroups, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___getwgroups, getwgroups, 2, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _getwgroups_np
.set _getwgroups_np, ___getwgroups
#endif
#if defined(__x86_64__)
.globl _getwgroups_np
.set _getwgroups_np, ___getwgroups
#endif
#if defined(__ppc__)
.globl _getwgroups_np
.set _getwgroups_np, ___getwgroups
#endif
#if defined(__arm64__)
.globl _getwgroups_np
.set _getwgroups_np, ___getwgroups
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 28
#include "SYS.h"
#ifndef SYS_guarded_open_dprotected_np
#error "SYS_guarded_open_dprotected_np not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___guarded_open_dprotected_np)
SYSCALL_NONAME(guarded_open_dprotected_np, 7, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___guarded_open_dprotected_np, guarded_open_dprotected_np, 7, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_guarded_open_np
#error "SYS_guarded_open_np not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___guarded_open_np)
SYSCALL_NONAME(guarded_open_np, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___guarded_open_np, guarded_open_np, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_identitysvc
#error "SYS_identitysvc not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___identitysvc)
SYSCALL_NONAME(identitysvc, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___identitysvc, identitysvc, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_initgroups
#error "SYS_initgroups not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___initgroups)
SYSCALL_NONAME(initgroups, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___initgroups, initgroups, 3, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,29 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_ioctl
#error "SYS_ioctl not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___ioctl)
ZERO_EXTEND(1)
SYSCALL_NONAME(ioctl, 3, cerror)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___ioctl, ioctl, 3, cerror)
#endif
#endif
#if defined(__i386__)
.globl _ioctl
.set _ioctl, ___ioctl
#endif
#if defined(__ppc__)
.globl _ioctl
.set _ioctl, ___ioctl
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_iopolicysys
#error "SYS_iopolicysys not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___iopolicysys)
SYSCALL_NONAME(iopolicysys, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___iopolicysys, iopolicysys, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,22 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_kdebug_trace
#error "SYS_kdebug_trace not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___kdebug_trace)
ZERO_EXTEND(2)
ZERO_EXTEND(1)
ZERO_EXTEND(3)
ZERO_EXTEND(4)
SYSCALL_NONAME(kdebug_trace, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___kdebug_trace, kdebug_trace, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 36
#include "SYS.h"
#ifndef SYS_kdebug_trace64
#error "SYS_kdebug_trace64 not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___kdebug_trace64)
SYSCALL_NONAME(kdebug_trace64, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___kdebug_trace64, kdebug_trace64, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 1999-2007 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
#include "SYS.h"
#if defined(__x86_64__)
__SYSCALL(___kdebug_trace_string, kdebug_trace_string, 3)
#elif defined(__i386__)
__SYSCALL_INT(___kdebug_trace_string, kdebug_trace_string, 3)
#elif defined(__arm__)
__SYSCALL(___kdebug_trace_string, kdebug_trace_string, 4)
#elif defined(__arm64__)
__SYSCALL(___kdebug_trace_string, kdebug_trace_string, 3)
#else
#error Unsupported architecture
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_kdebug_typefilter
#error "SYS_kdebug_typefilter not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___kdebug_typefilter)
SYSCALL_NONAME(kdebug_typefilter, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___kdebug_typefilter, kdebug_typefilter, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_kill
#error "SYS_kill not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___kill)
SYSCALL_NONAME(kill, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___kill, kill, 3, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,19 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_kqueue_workloop_ctl
#error "SYS_kqueue_workloop_ctl not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___kqueue_workloop_ctl)
ZERO_EXTEND(3)
SYSCALL_NONAME(kqueue_workloop_ctl, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___kqueue_workloop_ctl, kqueue_workloop_ctl, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_lchown
#error "SYS_lchown not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___lchown)
SYSCALL_NONAME(lchown, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___lchown, lchown, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _lchown$UNIX2003
.set _lchown$UNIX2003, ___lchown
#endif
#if defined(__x86_64__)
.globl _lchown
.set _lchown, ___lchown
#endif
#if defined(__ppc__)
.globl _lchown$UNIX2003
.set _lchown$UNIX2003, ___lchown
#endif
#if defined(__arm64__)
.globl _lchown
.set _lchown, ___lchown
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_listen
#error "SYS_listen not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___listen)
SYSCALL_NONAME(listen, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___listen, listen, 2, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _listen$UNIX2003
.set _listen$UNIX2003, ___listen
#endif
#if defined(__x86_64__)
.globl _listen
.set _listen, ___listen
#endif
#if defined(__ppc__)
.globl _listen$UNIX2003
.set _listen$UNIX2003, ___listen
#endif
#if defined(__arm64__)
.globl _listen
.set _listen, ___listen
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_log_data
#error "SYS_log_data not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___log_data)
SYSCALL_NONAME(log_data, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___log_data, log_data, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,69 @@
/*
* Copyright (c) 1999-2007 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
#include "SYS.h"
#if defined(__x86_64__)
__SYSCALL(___lseek, lseek, 3)
#elif defined(__i386__)
__SYSCALL_INT(___lseek, lseek, 3)
#elif defined(__arm__)
__SYSCALL(___lseek, lseek, 4)
#elif defined(__arm64__)
__SYSCALL(___lseek, lseek, 3)
#else
#error Unsupported architecture
#endif
#if defined(__i386__)
.globl _lseek
.set _lseek, ___lseek
#endif
#if defined(__x86_64__)
.globl _lseek
.set _lseek, ___lseek
#endif
#if defined(__ppc__)
.globl _lseek
.set _lseek, ___lseek
#endif
#if defined(__arm64__)
.globl _lseek
.set _lseek, ___lseek
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_lstat64_extended
#error "SYS_lstat64_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___lstat64_extended)
SYSCALL_NONAME(lstat64_extended, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___lstat64_extended, lstat64_extended, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_lstat_extended
#error "SYS_lstat_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___lstat_extended)
SYSCALL_NONAME(lstat_extended, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___lstat_extended, lstat_extended, 4, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS___mac_execve
#error "SYS___mac_execve not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_execve)
SYSCALL_NONAME(__mac_execve, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_execve, __mac_execve, 4, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl ___sandbox_me
.set ___sandbox_me, ___mac_execve
#endif
#if defined(__x86_64__)
.globl ___sandbox_me
.set ___sandbox_me, ___mac_execve
#endif
#if defined(__ppc__)
.globl ___sandbox_me
.set ___sandbox_me, ___mac_execve
#endif
#if defined(__arm64__)
.globl ___sandbox_me
.set ___sandbox_me, ___mac_execve
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mac_get_fd
#error "SYS___mac_get_fd not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_get_fd)
SYSCALL_NONAME(__mac_get_fd, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_get_fd, __mac_get_fd, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mac_get_file
#error "SYS___mac_get_file not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_get_file)
SYSCALL_NONAME(__mac_get_file, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_get_file, __mac_get_file, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mac_get_link
#error "SYS___mac_get_link not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_get_link)
SYSCALL_NONAME(__mac_get_link, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_get_link, __mac_get_link, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mac_get_mount
#error "SYS___mac_get_mount not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_get_mount)
SYSCALL_NONAME(__mac_get_mount, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_get_mount, __mac_get_mount, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mac_get_pid
#error "SYS___mac_get_pid not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_get_pid)
SYSCALL_NONAME(__mac_get_pid, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_get_pid, __mac_get_pid, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 4
#include "SYS.h"
#ifndef SYS___mac_get_proc
#error "SYS___mac_get_proc not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_get_proc)
SYSCALL_NONAME(__mac_get_proc, 1, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_get_proc, __mac_get_proc, 1, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS___mac_getfsstat
#error "SYS___mac_getfsstat not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_getfsstat)
SYSCALL_NONAME(__mac_getfsstat, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_getfsstat, __mac_getfsstat, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS___mac_mount
#error "SYS___mac_mount not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_mount)
SYSCALL_NONAME(__mac_mount, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_mount, __mac_mount, 5, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl ___sandbox_mm
.set ___sandbox_mm, ___mac_mount
#endif
#if defined(__x86_64__)
.globl ___sandbox_mm
.set ___sandbox_mm, ___mac_mount
#endif
#if defined(__ppc__)
.globl ___sandbox_mm
.set ___sandbox_mm, ___mac_mount
#endif
#if defined(__arm64__)
.globl ___sandbox_mm
.set ___sandbox_mm, ___mac_mount
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mac_set_fd
#error "SYS___mac_set_fd not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_set_fd)
SYSCALL_NONAME(__mac_set_fd, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_set_fd, __mac_set_fd, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mac_set_file
#error "SYS___mac_set_file not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_set_file)
SYSCALL_NONAME(__mac_set_file, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_set_file, __mac_set_file, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mac_set_link
#error "SYS___mac_set_link not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_set_link)
SYSCALL_NONAME(__mac_set_link, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_set_link, __mac_set_link, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 4
#include "SYS.h"
#ifndef SYS___mac_set_proc
#error "SYS___mac_set_proc not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_set_proc)
SYSCALL_NONAME(__mac_set_proc, 1, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_set_proc, __mac_set_proc, 1, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl ___sandbox_msp
.set ___sandbox_msp, ___mac_set_proc
#endif
#if defined(__x86_64__)
.globl ___sandbox_msp
.set ___sandbox_msp, ___mac_set_proc
#endif
#if defined(__ppc__)
.globl ___sandbox_msp
.set ___sandbox_msp, ___mac_set_proc
#endif
#if defined(__arm64__)
.globl ___sandbox_msp
.set ___sandbox_msp, ___mac_set_proc
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS___mac_syscall
#error "SYS___mac_syscall not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mac_syscall)
SYSCALL_NONAME(__mac_syscall, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mac_syscall, __mac_syscall, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl ___sandbox_ms
.set ___sandbox_ms, ___mac_syscall
#endif
#if defined(__x86_64__)
.globl ___sandbox_ms
.set ___sandbox_ms, ___mac_syscall
#endif
#if defined(__ppc__)
.globl ___sandbox_ms
.set ___sandbox_ms, ___mac_syscall
#endif
#if defined(__arm64__)
.globl ___sandbox_ms
.set ___sandbox_ms, ___mac_syscall
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS___mach_bridge_remote_time
#error "SYS___mach_bridge_remote_time not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mach_bridge_remote_time)
SYSCALL_NONAME(__mach_bridge_remote_time, 1, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mach_bridge_remote_time, __mach_bridge_remote_time, 1, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_mach_eventlink_signal
#error "SYS_mach_eventlink_signal not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mach_eventlink_signal)
SYSCALL_NONAME(mach_eventlink_signal, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mach_eventlink_signal, mach_eventlink_signal, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 36
#include "SYS.h"
#ifndef SYS_mach_eventlink_signal_wait_until
#error "SYS_mach_eventlink_signal_wait_until not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mach_eventlink_signal_wait_until)
SYSCALL_NONAME(mach_eventlink_signal_wait_until, 6, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mach_eventlink_signal_wait_until, mach_eventlink_signal_wait_until, 6, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 28
#include "SYS.h"
#ifndef SYS_mach_eventlink_wait_until
#error "SYS_mach_eventlink_wait_until not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mach_eventlink_wait_until)
SYSCALL_NONAME(mach_eventlink_wait_until, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mach_eventlink_wait_until, mach_eventlink_wait_until, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 0
#include "SYS.h"
#ifndef SYS_memorystatus_available_memory
#error "SYS_memorystatus_available_memory not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___memorystatus_available_memory)
SYSCALL_NONAME(memorystatus_available_memory, 0, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___memorystatus_available_memory, memorystatus_available_memory, 0, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_microstackshot
#error "SYS_microstackshot not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___microstackshot)
SYSCALL_NONAME(microstackshot, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___microstackshot, microstackshot, 3, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_mkdir_extended
#error "SYS_mkdir_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mkdir_extended)
SYSCALL_NONAME(mkdir_extended, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mkdir_extended, mkdir_extended, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_mkfifo_extended
#error "SYS_mkfifo_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mkfifo_extended)
SYSCALL_NONAME(mkfifo_extended, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mkfifo_extended, mkfifo_extended, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,29 @@
#define __SYSCALL_32BIT_ARG_BYTES 28
#include "SYS.h"
#ifndef SYS_mmap
#error "SYS_mmap not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mmap)
ZERO_EXTEND(1)
SYSCALL_NONAME(mmap, 6, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mmap, mmap, 6, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _mmap
.set _mmap, ___mmap
#endif
#if defined(__ppc__)
.globl _mmap
.set _mmap, ___mmap
#endif

View File

@ -0,0 +1,39 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_mprotect
#error "SYS_mprotect not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___mprotect)
ZERO_EXTEND(1)
SYSCALL_NONAME(mprotect, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___mprotect, mprotect, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _mprotect$UNIX2003
.set _mprotect$UNIX2003, ___mprotect
#endif
#if defined(__x86_64__)
.globl _mprotect
.set _mprotect, ___mprotect
#endif
#if defined(__ppc__)
.globl _mprotect$UNIX2003
.set _mprotect$UNIX2003, ___mprotect
#endif
#if defined(__arm64__)
.globl _mprotect
.set _mprotect, ___mprotect
#endif

View File

@ -0,0 +1,38 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_msgctl
#error "SYS_msgctl not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___msgctl)
SYSCALL_NONAME(msgctl, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___msgctl, msgctl, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _msgctl$UNIX2003
.set _msgctl$UNIX2003, ___msgctl
#endif
#if defined(__x86_64__)
.globl _msgctl
.set _msgctl, ___msgctl
#endif
#if defined(__ppc__)
.globl _msgctl$UNIX2003
.set _msgctl$UNIX2003, ___msgctl
#endif
#if defined(__arm64__)
.globl _msgctl
.set _msgctl, ___msgctl
#endif

View File

@ -0,0 +1,44 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_msgrcv_nocancel
#error "SYS_msgrcv_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___msgrcv_nocancel)
ZERO_EXTEND(2)
SIGN_EXTEND(3)
SYSCALL_NONAME(msgrcv_nocancel, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___msgrcv_nocancel, msgrcv_nocancel, 5, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _msgrcv
.set _msgrcv, ___msgrcv_nocancel
.globl _msgrcv$NOCANCEL$UNIX2003
.set _msgrcv$NOCANCEL$UNIX2003, ___msgrcv_nocancel
#endif
#if defined(__x86_64__)
.globl _msgrcv$NOCANCEL
.set _msgrcv$NOCANCEL, ___msgrcv_nocancel
#endif
#if defined(__ppc__)
.globl _msgrcv
.set _msgrcv, ___msgrcv_nocancel
.globl _msgrcv$NOCANCEL$UNIX2003
.set _msgrcv$NOCANCEL$UNIX2003, ___msgrcv_nocancel
#endif
#if defined(__arm64__)
.globl _msgrcv$NOCANCEL
.set _msgrcv$NOCANCEL, ___msgrcv_nocancel
#endif

View File

@ -0,0 +1,43 @@
#define __SYSCALL_32BIT_ARG_BYTES 16
#include "SYS.h"
#ifndef SYS_msgsnd_nocancel
#error "SYS_msgsnd_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___msgsnd_nocancel)
ZERO_EXTEND(2)
SYSCALL_NONAME(msgsnd_nocancel, 4, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___msgsnd_nocancel, msgsnd_nocancel, 4, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _msgsnd
.set _msgsnd, ___msgsnd_nocancel
.globl _msgsnd$NOCANCEL$UNIX2003
.set _msgsnd$NOCANCEL$UNIX2003, ___msgsnd_nocancel
#endif
#if defined(__x86_64__)
.globl _msgsnd$NOCANCEL
.set _msgsnd$NOCANCEL, ___msgsnd_nocancel
#endif
#if defined(__ppc__)
.globl _msgsnd
.set _msgsnd, ___msgsnd_nocancel
.globl _msgsnd$NOCANCEL$UNIX2003
.set _msgsnd$NOCANCEL$UNIX2003, ___msgsnd_nocancel
#endif
#if defined(__arm64__)
.globl _msgsnd$NOCANCEL
.set _msgsnd$NOCANCEL, ___msgsnd_nocancel
#endif

View File

@ -0,0 +1,33 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_msgsys
#error "SYS_msgsys not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___msgsys)
SYSCALL_NONAME(msgsys, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___msgsys, msgsys, 5, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _msgsys
.set _msgsys, ___msgsys
#endif
#if defined(__x86_64__)
.globl _msgsys
.set _msgsys, ___msgsys
#endif
#if defined(__ppc__)
.globl _msgsys
.set _msgsys, ___msgsys
#endif

View File

@ -0,0 +1,39 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_msync
#error "SYS_msync not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___msync)
ZERO_EXTEND(1)
SYSCALL_NONAME(msync, 3, cerror)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___msync, msync, 3, cerror)
#endif
#endif
#if defined(__i386__)
.globl _msync$UNIX2003
.set _msync$UNIX2003, ___msync
#endif
#if defined(__x86_64__)
.globl _msync
.set _msync, ___msync
#endif
#if defined(__ppc__)
.globl _msync$UNIX2003
.set _msync$UNIX2003, ___msync
#endif
#if defined(__arm64__)
.globl _msync
.set _msync, ___msync
#endif

View File

@ -0,0 +1,39 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_msync_nocancel
#error "SYS_msync_nocancel not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___msync_nocancel)
ZERO_EXTEND(1)
SYSCALL_NONAME(msync_nocancel, 3, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___msync_nocancel, msync_nocancel, 3, cerror_nocancel)
#endif
#endif
#if defined(__i386__)
.globl _msync$NOCANCEL$UNIX2003
.set _msync$NOCANCEL$UNIX2003, ___msync_nocancel
#endif
#if defined(__x86_64__)
.globl _msync$NOCANCEL
.set _msync$NOCANCEL, ___msync_nocancel
#endif
#if defined(__ppc__)
.globl _msync$NOCANCEL$UNIX2003
.set _msync$NOCANCEL$UNIX2003, ___msync_nocancel
#endif
#if defined(__arm64__)
.globl _msync$NOCANCEL
.set _msync$NOCANCEL, ___msync_nocancel
#endif

View File

@ -0,0 +1,19 @@
#define __SYSCALL_32BIT_ARG_BYTES 8
#include "SYS.h"
#ifndef SYS_munmap
#error "SYS_munmap not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___munmap)
ZERO_EXTEND(1)
SYSCALL_NONAME(munmap, 2, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___munmap, munmap, 2, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS___old_semwait_signal
#error "SYS___old_semwait_signal not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___old_semwait_signal)
SYSCALL_NONAME(__old_semwait_signal, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___old_semwait_signal, __old_semwait_signal, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,30 @@
#define __SYSCALL_32BIT_ARG_BYTES 12
#include "SYS.h"
#ifndef SYS_open
#error "SYS_open not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___open)
SYSCALL_NONAME(open, 3, cerror)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___open, open, 3, cerror)
#endif
#endif
#if defined(__i386__)
.globl _open
.set _open, ___open
.globl _open$UNIX2003
.set _open$UNIX2003, ___open
#endif
#if defined(__ppc__)
.globl _open$UNIX2003
.set _open$UNIX2003, ___open
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 20
#include "SYS.h"
#ifndef SYS_open_dprotected_np
#error "SYS_open_dprotected_np not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___open_dprotected_np)
SYSCALL_NONAME(open_dprotected_np, 5, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___open_dprotected_np, open_dprotected_np, 5, cerror_nocancel)
#endif
#endif

View File

@ -0,0 +1,18 @@
#define __SYSCALL_32BIT_ARG_BYTES 24
#include "SYS.h"
#ifndef SYS_open_extended
#error "SYS_open_extended not defined. The header files libsyscall is building against do not match syscalls.master."
#endif
#if defined(__arm64__)
MI_ENTRY_POINT(___open_extended)
SYSCALL_NONAME(open_extended, 6, cerror_nocancel)
ret
#else
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__arm64__)
__SYSCALL2(___open_extended, open_extended, 6, cerror_nocancel)
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More