Add accept4() syscall
Add accept4() using SYSCALLS.TXT and gensyscall Change-Id: I6f19f29144186d15d46423e10f2cc4b4223719c6
This commit is contained in:
17
libc/arch-x86_64/syscalls/accept4.S
Normal file
17
libc/arch-x86_64/syscalls/accept4.S
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Generated by gensyscalls.py. Do not edit. */
|
||||
|
||||
#include <private/bionic_asm.h>
|
||||
|
||||
ENTRY(accept4)
|
||||
movq %rcx, %r10
|
||||
movl $__NR_accept4, %eax
|
||||
syscall
|
||||
cmpq $-MAX_ERRNO, %rax
|
||||
jb 1f
|
||||
negl %eax
|
||||
movl %eax, %edi
|
||||
call __set_errno
|
||||
orq $-1, %rax
|
||||
1:
|
||||
ret
|
||||
END(accept4)
|
||||
Reference in New Issue
Block a user