X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibposix.so_src%2Funistd.c;h=3af7bcbc34f15cf7f54e38051a5f3112c3a83c4a;hb=b52f69bd4a5299bd990b9153dc80da5c898864c7;hp=a2f4eb7f2ddc07c0bbe8dfd26c76551312859872;hpb=a4c5446b23df108289ea71df2b63a7e26ab19375;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libposix.so_src/unistd.c b/Usermode/Libraries/libposix.so_src/unistd.c index a2f4eb7f..3af7bcbc 100644 --- a/Usermode/Libraries/libposix.so_src/unistd.c +++ b/Usermode/Libraries/libposix.so_src/unistd.c @@ -50,6 +50,12 @@ int open(const char *path, int openmode, ...) return ret; } +int access(const char *path, int openmode) +{ + errno = EINVAL; + return -1; +} + int creat(const char *path, mode_t mode) { // TODO: Make native call to do this cheaper @@ -183,6 +189,17 @@ int usleep(useconds_t usec) return 0; } +unsigned int alarm(unsigned int seconds) +{ + static int64_t alarm_time; + if( seconds > 0 ) + { + alarm_time = _SysTimestamp() + seconds * 1000; + // TODO: Schedule SIGALRM + } + return (alarm_time - _SysTimestamp()) / 1000; +} + int kill(pid_t pid, int signal) { // TODO: Need special handling?