Make improvements

- Document redbean's argon2 module
- Fix regressions in cthreads library
- Make testlib work better with threads
- Give the cthreads library lots of love
- Remove some of the stdio assembly code
- Implement getloadavg() across platforms
- Code size optimizations for errnos, etc.
- Only check for signals in main thread on Windows
- Make errnos for dup2 / dup3 consistent with posix

This change also fixes a bug in the argon2 module, where the NUL
terminator was being included in the hash encoded ascii string. This
shouldn't require any database migrations to folks who found this module
and productionized it, since the argon2 library treats it as a c string.
This commit is contained in:
Justine Tunney 2022-05-27 13:25:46 -07:00
parent cb67223051
commit de5de19004
234 changed files with 1728 additions and 1993 deletions

View file

@ -1285,6 +1285,14 @@ syscon rusage RUSAGE_THREAD 1 99 1 1 1 1 # faked nt & unavailable
syscon rusage RUSAGE_CHILDREN -1 -1 -1 -1 -1 99 # unix consensus & unavailable on nt
syscon rusage RUSAGE_BOTH -2 99 99 99 99 99 # woop
# fast userspace mutexes
#
# 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 0
syscon futex FUTEX_REQUEUE 3 0 0 3 0 0
syscon futex FUTEX_PRIVATE_FLAG 128 0 0 128 0 0
# Teletypewriter Control, e.g.
#
# TCSETS → About 70,800 results (0.31 seconds)
@ -1817,14 +1825,6 @@ syscon misc DAY_5 0x02000b 11 11 10 10 0
syscon misc DAY_6 0x02000c 12 12 11 11 0
syscon misc DAY_7 0x02000d 13 13 12 12 0
syscon misc FUTEX_PRIVATE_FLAG 128 0 0 0x80 0x80 0
syscon misc FUTEX_REQUEUE 3 0 0 3 3 0
syscon misc FUTEX_REQUEUE_PRIVATE 131 0 0 131 131 0
syscon misc FUTEX_WAIT 0 0 0 1 1 0
syscon misc FUTEX_WAIT_PRIVATE 128 0 0 129 129 0
syscon misc FUTEX_WAKE 1 0 0 2 2 0
syscon misc FUTEX_WAKE_PRIVATE 129 0 0 130 130 0
syscon misc HOST_NOT_FOUND 1 1 1 1 1 0x2af9 # unix consensus
syscon misc HOST_NAME_MAX 0x40 0 0 255 255 0
@ -1880,7 +1880,7 @@ syscon misc FALLOC_FL_UNSHARE_RANGE 0x40 -1 -1 -1 -1 -1 # bsd cons
# System Call Numbers.
#
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology
syscon nr __NR_exit 0x003c 0x2000169 0x01af 0x012e 0x136 0xfff # __bsdthread_terminate() on XNU, thr_exit() on FreeBSD, sys___threxit() on OpenBSD, __lwp_exit() on NetBSD
syscon nr __NR_exit 0x003c 0x2000169 0x01af 0x012e 0x136 0xfff # __bsdthread_terminate() on XNU, thr_exit() on FreeBSD, __threxit() on OpenBSD, __lwp_exit() on NetBSD
syscon nr __NR_exit_group 0x00e7 0x2000001 0x0001 0x0001 0x001 0xfff
syscon nr __NR_read 0x0000 0x2000003 0x0003 0x0003 0x003 0xfff
syscon nr __NR_write 0x0001 0x2000004 0x0004 0x0004 0x004 0xfff

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon misc,FUTEX_PRIVATE_FLAG,128,0,0,0x80,0x80,0
.syscon futex,FUTEX_PRIVATE_FLAG,128,0,0,128,0,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon misc,FUTEX_REQUEUE,3,0,0,3,3,0
.syscon futex,FUTEX_REQUEUE,3,0,0,3,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon misc,FUTEX_REQUEUE_PRIVATE,131,0,0,131,131,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon misc,FUTEX_WAIT,0,0,0,1,1,0
.syscon futex,FUTEX_WAIT,0,0,0,1,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon misc,FUTEX_WAIT_PRIVATE,128,0,0,129,129,0

View file

@ -1,2 +1,2 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon misc,FUTEX_WAKE,1,0,0,2,2,0
.syscon futex,FUTEX_WAKE,1,0,0,2,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon misc,FUTEX_WAKE_PRIVATE,129,0,0,130,130,0

View file

@ -2,24 +2,21 @@
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FUTEX_H_
#include "libc/runtime/symbolic.h"
#define FUTEX_PRIVATE_FLAG SYMBOLIC(FUTEX_PRIVATE_FLAG)
#define FUTEX_REQUEUE SYMBOLIC(FUTEX_REQUEUE)
#define FUTEX_REQUEUE_PRIVATE SYMBOLIC(FUTEX_REQUEUE_PRIVATE)
#define FUTEX_WAIT SYMBOLIC(FUTEX_WAIT)
#define FUTEX_WAIT_PRIVATE SYMBOLIC(FUTEX_WAIT_PRIVATE)
#define FUTEX_WAKE SYMBOLIC(FUTEX_WAKE)
#define FUTEX_WAKE_PRIVATE SYMBOLIC(FUTEX_WAKE_PRIVATE)
#define FUTEX_REQUEUE SYMBOLIC(FUTEX_REQUEUE)
#define FUTEX_PRIVATE_FLAG SYMBOLIC(FUTEX_PRIVATE_FLAG)
#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const long FUTEX_PRIVATE_FLAG;
extern const long FUTEX_REQUEUE;
extern const long FUTEX_REQUEUE_PRIVATE;
extern const long FUTEX_WAIT;
extern const long FUTEX_WAIT_PRIVATE;
extern const long FUTEX_WAKE;
extern const long FUTEX_WAKE_PRIVATE;
extern const long FUTEX_REQUEUE;
extern const long FUTEX_PRIVATE_FLAG;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

28
libc/sysv/errfun.S Normal file
View file

@ -0,0 +1,28 @@
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi
Copyright 2022 Justine Alexandra Roberts Tunney
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/macros.internal.h"
.text.unlikely
__errfun:
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
.endfn __errfun,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
e2big: .leafprologue
.profilable
mov E2BIG(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn e2big,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eacces: .leafprologue
.profilable
mov EACCES(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eacces,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eaddrinuse:
.leafprologue
.profilable
mov EADDRINUSE(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eaddrinuse,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eaddrnotavail:
.leafprologue
.profilable
mov EADDRNOTAVAIL(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eaddrnotavail,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eadv: .leafprologue
.profilable
mov EADV(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eadv,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eafnosupport:
.leafprologue
.profilable
mov EAFNOSUPPORT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eafnosupport,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eagain: .leafprologue
.profilable
mov EAGAIN(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eagain,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ealready:
.leafprologue
.profilable
mov EALREADY(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ealready,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ebade: .leafprologue
.profilable
mov EBADE(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ebade,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ebadf: .leafprologue
.profilable
mov EBADF(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ebadf,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ebadfd: .leafprologue
.profilable
mov EBADFD(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ebadfd,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ebadmsg:
.leafprologue
.profilable
mov EBADMSG(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ebadmsg,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ebadr: .leafprologue
.profilable
mov EBADR(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ebadr,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ebadrqc:
.leafprologue
.profilable
mov EBADRQC(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ebadrqc,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ebadslt:
.leafprologue
.profilable
mov EBADSLT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ebadslt,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ebusy: .leafprologue
.profilable
mov EBUSY(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ebusy,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ecanceled:
.leafprologue
.profilable
mov ECANCELED(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ecanceled,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
echild: .leafprologue
.profilable
mov ECHILD(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn echild,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
echrng: .leafprologue
.profilable
mov ECHRNG(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn echrng,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ecomm: .leafprologue
.profilable
mov ECOMM(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ecomm,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
econnaborted:
.leafprologue
.profilable
mov ECONNABORTED(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn econnaborted,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
econnrefused:
.leafprologue
.profilable
mov ECONNREFUSED(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn econnrefused,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
econnreset:
.leafprologue
.profilable
mov ECONNRESET(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn econnreset,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
edeadlk:
.leafprologue
.profilable
mov EDEADLK(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn edeadlk,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
edestaddrreq:
.leafprologue
.profilable
mov EDESTADDRREQ(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn edestaddrreq,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
edom: .leafprologue
.profilable
mov EDOM(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn edom,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
edotdot:
.leafprologue
.profilable
mov EDOTDOT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn edotdot,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
edquot: .leafprologue
.profilable
mov EDQUOT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn edquot,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eexist: .leafprologue
.profilable
mov EEXIST(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eexist,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
efault: .leafprologue
.profilable
mov EFAULT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn efault,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
efbig: .leafprologue
.profilable
mov EFBIG(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn efbig,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ehostdown:
.leafprologue
.profilable
mov EHOSTDOWN(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ehostdown,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ehostunreach:
.leafprologue
.profilable
mov EHOSTUNREACH(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ehostunreach,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ehwpoison:
.leafprologue
.profilable
mov EHWPOISON(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ehwpoison,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eidrm: .leafprologue
.profilable
mov EIDRM(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eidrm,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eilseq: .leafprologue
.profilable
mov EILSEQ(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eilseq,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
einprogress:
.leafprologue
.profilable
mov EINPROGRESS(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn einprogress,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eintr: .leafprologue
.profilable
mov EINTR(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eintr,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
einval: .leafprologue
.profilable
mov EINVAL(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn einval,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eio: .leafprologue
.profilable
mov EIO(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eio,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eisconn:
.leafprologue
.profilable
mov EISCONN(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eisconn,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eisdir: .leafprologue
.profilable
mov EISDIR(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eisdir,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eisnam: .leafprologue
.profilable
mov EISNAM(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eisnam,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ekeyexpired:
.leafprologue
.profilable
mov EKEYEXPIRED(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ekeyexpired,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ekeyrejected:
.leafprologue
.profilable
mov EKEYREJECTED(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ekeyrejected,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
ekeyrevoked:
.leafprologue
.profilable
mov EKEYREVOKED(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn ekeyrevoked,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
el2hlt: .leafprologue
.profilable
mov EL2HLT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn el2hlt,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
el2nsync:
.leafprologue
.profilable
mov EL2NSYNC(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn el2nsync,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
el3hlt: .leafprologue
.profilable
mov EL3HLT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn el3hlt,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
el3rst: .leafprologue
.profilable
mov EL3RST(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn el3rst,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
elibacc:
.leafprologue
.profilable
mov ELIBACC(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn elibacc,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
elibbad:
.leafprologue
.profilable
mov ELIBBAD(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn elibbad,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
elibexec:
.leafprologue
.profilable
mov ELIBEXEC(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn elibexec,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
elibmax:
.leafprologue
.profilable
mov ELIBMAX(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn elibmax,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
elibscn:
.leafprologue
.profilable
mov ELIBSCN(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn elibscn,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
elnrng: .leafprologue
.profilable
mov ELNRNG(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn elnrng,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
eloop: .leafprologue
.profilable
mov ELOOP(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn eloop,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
emediumtype:
.leafprologue
.profilable
mov EMEDIUMTYPE(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn emediumtype,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
emfile: .leafprologue
.profilable
mov EMFILE(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn emfile,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
emlink: .leafprologue
.profilable
mov EMLINK(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn emlink,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
emsgsize:
.leafprologue
.profilable
mov EMSGSIZE(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn emsgsize,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
emultihop:
.leafprologue
.profilable
mov EMULTIHOP(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn emultihop,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enametoolong:
.leafprologue
.profilable
mov ENAMETOOLONG(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enametoolong,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enavail:
.leafprologue
.profilable
mov ENAVAIL(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enavail,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enetdown:
.leafprologue
.profilable
mov ENETDOWN(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enetdown,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enetreset:
.leafprologue
.profilable
mov ENETRESET(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enetreset,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enetunreach:
.leafprologue
.profilable
mov ENETUNREACH(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enetunreach,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enfile: .leafprologue
.profilable
mov ENFILE(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enfile,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enoano: .leafprologue
.profilable
mov ENOANO(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enoano,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enobufs:
.leafprologue
.profilable
mov ENOBUFS(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enobufs,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enocsi: .leafprologue
.profilable
mov ENOCSI(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enocsi,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enodata:
.leafprologue
.profilable
mov ENODATA(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enodata,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enodev: .leafprologue
.profilable
mov ENODEV(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enodev,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enoent: .leafprologue
.profilable
mov ENOENT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enoent,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enoexec:
.leafprologue
.profilable
mov ENOEXEC(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enoexec,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enokey: .leafprologue
.profilable
mov ENOKEY(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enokey,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enolck: .leafprologue
.profilable
mov ENOLCK(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enolck,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enolink:
.leafprologue
.profilable
mov ENOLINK(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enolink,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enomedium:
.leafprologue
.profilable
mov ENOMEDIUM(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enomedium,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enomem: .leafprologue
.profilable
mov ENOMEM(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enomem,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enomsg: .leafprologue
.profilable
mov ENOMSG(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enomsg,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enonet: .leafprologue
.profilable
mov ENONET(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enonet,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enopkg: .leafprologue
.profilable
mov ENOPKG(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enopkg,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enoprotoopt:
.leafprologue
.profilable
mov ENOPROTOOPT(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enoprotoopt,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enospc: .leafprologue
.profilable
mov ENOSPC(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enospc,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enosr: .leafprologue
.profilable
mov ENOSR(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enosr,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enostr: .leafprologue
.profilable
mov ENOSTR(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enostr,globl,hidden

View file

@ -1,13 +1,8 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enosys: .leafprologue
.profilable
mov ENOSYS(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enosys,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enotblk:
.leafprologue
.profilable
mov ENOTBLK(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enotblk,globl,hidden

View file

@ -1,14 +1,9 @@
#include "libc/macros.internal.h"
.text.unlikely
.section .privileged,"ax",@progbits
enotconn:
.leafprologue
.profilable
mov ENOTCONN(%rip),%ecx
.errno
mov %ecx,(%rax)
push $-1
pop %rax
.leafepilogue
jmp __errfun
.endfn enotconn,globl,hidden

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