Rewrite recursive mutex code

This commit is contained in:
Justine Tunney 2022-09-10 09:14:40 -07:00
parent bae7367774
commit cfcf5918bc
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
27 changed files with 164 additions and 257 deletions

View file

@ -20,11 +20,14 @@
#include "libc/macros.internal.h"
.privileged
_futex: mov %rcx,%r10
_futex: push %rbp
mov %rsp,%rbp
mov %rcx,%r10
mov __NR_futex,%eax
clc
syscall
jnc 1f
neg %eax
1: ret
1: pop %rbp
ret
.endfn _futex,globl,hidden