os/libc/errno.c
2019-04-08 15:58:30 -05:00

9 lines
142 B
C

int* __get_errno_address() {
int* address;
asm volatile(" \
mov $5, %%eax; \
int $80; \
":"=b"(address):);
return address;
}