mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Reduce build graph by another eight percent
This commit is contained in:
parent
367d06d9e4
commit
0ea0d33a77
249 changed files with 889 additions and 988 deletions
36
libc/calls/struct/fd.internal.h
Normal file
36
libc/calls/struct/fd.internal.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
enum FdKind {
|
||||
kFdEmpty,
|
||||
kFdFile,
|
||||
kFdSocket,
|
||||
kFdProcess,
|
||||
kFdConsole,
|
||||
kFdSerial,
|
||||
kFdZip,
|
||||
kFdEpoll,
|
||||
kFdReserved
|
||||
};
|
||||
|
||||
struct Fd {
|
||||
enum FdKind kind;
|
||||
unsigned flags;
|
||||
unsigned mode;
|
||||
int64_t handle;
|
||||
int64_t extra;
|
||||
bool zombie;
|
||||
};
|
||||
|
||||
struct Fds {
|
||||
int f; /* lowest free slot */
|
||||
size_t n; /* monotonic capacity */
|
||||
struct Fd *p;
|
||||
struct Fd __init_p[OPEN_MAX];
|
||||
};
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_FD_INTERNAL_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue