mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-01 12:03:41 +00:00
fa20edc44d
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
37 lines
784 B
C
37 lines
784 B
C
#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_
|
|
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_
|
|
COSMOPOLITAN_C_START_
|
|
|
|
#define kFdEmpty 0
|
|
#define kFdFile 1
|
|
#define kFdSocket 2
|
|
#define kFdConsole 4
|
|
#define kFdSerial 5
|
|
#define kFdZip 6
|
|
#define kFdEpoll 7
|
|
#define kFdReserved 8
|
|
#define kFdDevNull 9
|
|
|
|
struct Fd {
|
|
char kind;
|
|
bool isbound;
|
|
unsigned flags;
|
|
unsigned mode;
|
|
long handle;
|
|
long pointer;
|
|
int family;
|
|
int type;
|
|
int protocol;
|
|
unsigned rcvtimeo; /* millis; 0 means wait forever */
|
|
unsigned sndtimeo; /* millis; 0 means wait forever */
|
|
void *connect_op;
|
|
};
|
|
|
|
struct Fds {
|
|
_Atomic(int) f; /* lowest free slot */
|
|
size_t n;
|
|
struct Fd *p, *e;
|
|
};
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_ */
|