syscalls: fchdir, setitimer, getitimer

This commit is contained in:
Matheus
2024-05-29 11:10:24 -03:00
parent 5b5d300fc1
commit 5f7791cd08
11 changed files with 313 additions and 13 deletions
+6
View File
@@ -4,12 +4,18 @@
#include <util.h>
typedef long time_t;
typedef long suseconds_t;
typedef struct {
time_t s;
time_t ns;
} timespec_t;
typedef struct {
time_t s;
suseconds_t us;
} timeval_t;
static inline timespec_t timespec_add(timespec_t a, timespec_t b) {
timespec_t ts;
ts.ns = (a.ns + b.ns) % 1000000000;