os/libc/errno.c

9 lines
142 B
C
Raw Normal View History

2019-04-08 15:58:30 -05:00
int* __get_errno_address() {
int* address;
asm volatile(" \
mov $5, %%eax; \
int $80; \
":"=b"(address):);
return address;
}