wip on intellisense (again)

This commit is contained in:
Alexander Nicholi 2021-02-02 11:14:45 -05:00
parent 9841e2186a
commit 7642710155
No known key found for this signature in database
GPG key ID: B75B2EB05540F74C
18 changed files with 242 additions and 52 deletions

View file

@ -36,25 +36,28 @@ struct IoctlPtmGet {
char theduxname[16];
char workername[16];
};
enum FdKind {
kFdEmpty,
kFdFile,
kFdSocket,
kFdProcess,
kFdConsole,
kFdSerial,
kFdZip,
kFdEpoll,
};
struct Fd {
int64_t handle;
int64_t extra;
int kind;
unsigned flags;
};
struct Fds {
size_t f; // lowest free slot
size_t n; // monotonic capacity
struct Fd {
int64_t handle;
int64_t extra;
enum FdKind {
kFdEmpty,
kFdFile,
kFdSocket,
kFdProcess,
kFdConsole,
kFdSerial,
kFdZip,
kFdEpoll,
} kind;
unsigned flags;
} * p;
struct Fd * p;
struct Fd __init_p[OPEN_MAX];
};
@ -76,7 +79,7 @@ forceinline bool __isfdopen(int fd) {
return 0 <= fd && fd < g_fds.n && g_fds.p[fd].kind != kFdEmpty;
}
forceinline bool __isfdkind(int fd, enum FdKind kind) {
forceinline bool __isfdkind(int fd, int kind) {
return 0 <= fd && fd < g_fds.n && g_fds.p[fd].kind == kind;
}