summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2010-10-04 17:48:47 -0500
committerPatrick Williams <iawillia@us.ibm.com>2010-10-04 17:48:47 -0500
commit3e9ed72a3b6442eaebadf26294e448862c3a4400 (patch)
treef3745143af3f1f87d99f3dec1256549195bf7fe1 /src/lib
parent706838262ce47efeb8f983920a218460b81f2dc3 (diff)
downloadtalos-hostboot-3e9ed72a3b6442eaebadf26294e448862c3a4400.tar.gz
talos-hostboot-3e9ed72a3b6442eaebadf26294e448862c3a4400.zip
Add nanosleep syscall.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/makefile2
-rw-r--r--src/lib/syscall_time.C9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/makefile b/src/lib/makefile
index 19d29f7ad..447149e48 100644
--- a/src/lib/makefile
+++ b/src/lib/makefile
@@ -3,7 +3,7 @@ OBJDIR = ${ROOTPATH}/obj/hbicore
OBJS = string.o stdlib.o
OBJS += syscall_stub.o syscall_task.o syscall_mutex.o syscall_msg.o
-OBJS += syscall_mmio.o
+OBJS += syscall_mmio.o syscall_time.o
OBJECTS = $(addprefix ${OBJDIR}/, ${OBJS})
all: ${OBJECTS}
diff --git a/src/lib/syscall_time.C b/src/lib/syscall_time.C
new file mode 100644
index 000000000..5c45fa80b
--- /dev/null
+++ b/src/lib/syscall_time.C
@@ -0,0 +1,9 @@
+#include <sys/time.h>
+#include <sys/syscall.h>
+
+using namespace Systemcalls;
+
+int nanosleep(uint64_t sec, uint64_t nsec)
+{
+ return (int64_t) _syscall2(TIME_NANOSLEEP, (void*)sec, (void*)nsec);
+}
OpenPOWER on IntegriCloud