Support futexes on FreeBSD

This commit is contained in:
Justine Tunney 2022-10-02 11:56:27 -07:00
parent 795d295590
commit 7549a5755e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
10 changed files with 81 additions and 31 deletions

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.internal.inc"
.scall sys_umtx_op,0xffffff1c6fffffff,globl

View file

@ -1316,9 +1316,9 @@ syscon rusage RUSAGE_BOTH -2 99 99 99 99 99 # woop
#
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
syscon futex FUTEX_WAIT 0 0 0 1 0 0
syscon futex FUTEX_WAKE 1 0 0 2 0 1
syscon futex FUTEX_WAKE 1 0 1 2 0 1
syscon futex FUTEX_REQUEUE 3 0 0 3 0 0
syscon futex FUTEX_PRIVATE_FLAG 128 0 0 128 0 0
syscon futex FUTEX_PRIVATE_FLAG 128 0 128 128 0 0
# lio_listio() magnums
#

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon futex,FUTEX_PRIVATE_FLAG,128,0,0,128,0,0
.syscon futex,FUTEX_PRIVATE_FLAG,128,0,128,128,0,0

View file

@ -1,2 +1,2 @@
.include "o/libc/sysv/consts/syscon.internal.inc"
.syscon futex,FUTEX_WAKE,1,0,0,2,0,1
.syscon futex,FUTEX_WAKE,1,0,1,2,0,1

View file

@ -18,6 +18,7 @@
╚────────────────────────────────────────────────────────────────'>/dev/null #*/
dir=libc/sysv/calls
. libc/sysv/gen.sh
#include "libc/calls/syscall-sysv.internal.h"
# The Fifth Bell System Interface, Community Edition ┌─────────────────────────┐
# » so many numbers │ legend │
@ -641,7 +642,7 @@ scall sys_bsdthread_register 0xfffffffff216efff globl hidden
#scall write_nocancel 0xfffffffff218dfff globl
#scall writev_nocancel 0xfffffffff219cfff globl
#──────────────────────────FREEBSD───────────────────────────
#scall _umtx_op 0xffffff1c6fffffff globl
scall sys_umtx_op 0xffffff1c6fffffff globl
#scall abort2 0xffffff1cffffffff globl
#scall afs3_syscall 0xffffff179fffffff globl
#scall bindat 0xffffff21afffffff globl