git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://ted.mutabah.net/acess2
[tpg/acess2.git]
/
Usermode
/
Libraries
/
libposix.so_src
/
unistd.c
diff --git
a/Usermode/Libraries/libposix.so_src/unistd.c
b/Usermode/Libraries/libposix.so_src/unistd.c
index
a2f4eb7
..
3af7bcb
100644
(file)
--- 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;
}
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
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;
}
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?
int kill(pid_t pid, int signal)
{
// TODO: Need special handling?
UCC
git Repository :: git.ucc.asn.au