mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:55:08 +00:00

Move syscall to int 0x82 since using int 0x80 was kinda prone to fork bombs when building things on Linux. :^)
24 lines
587 B
C
24 lines
587 B
C
#pragma once
|
|
|
|
#include <sys/cdefs.h>
|
|
#include <sys/types.h>
|
|
#include <string.h>
|
|
|
|
__BEGIN_DECLS
|
|
|
|
#define FD_SETSIZE 64
|
|
#define FD_ZERO(set) memset((set), 0, sizeof(fd_set));
|
|
#define FD_CLR(fd, set) ((set)->bits[(fd / 8)] &= ~(1 << (fd) % 8))
|
|
#define FD_SET(fd, set) ((set)->bits[(fd / 8)] |= (1 << (fd) % 8))
|
|
#define FD_ISSET(fd, set) ((set)->bits[(fd / 8)] & (1 << (fd) % 8))
|
|
|
|
struct __fd_set {
|
|
unsigned char bits[FD_SETSIZE / 8];
|
|
};
|
|
|
|
typedef struct __fd_set fd_set;
|
|
|
|
int select(int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, struct timeval* timeout);
|
|
|
|
__END_DECLS
|
|
|