Add the nanosleep syscall
authorKevin Klues <klueska@cs.berkeley.edu>
Fri, 20 Nov 2015 02:07:45 +0000 (18:07 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 24 Nov 2015 20:24:34 +0000 (15:24 -0500)
commite5f22b4d993a1ba6a08b5f6e583099467b38431a
tree296614232d9961a75a846088f3936e5ece0309ed
parentfafa68356f1182fc8a9689be66ee6eef2006c54b
Add the nanosleep syscall

This syscall provides the nanosleep API as specified here:

http://pubs.opengroup.org/onlinepubs/009695399/functions/nanosleep.html

However, it currently runs with a microsecond alarm under the hood, so
all requests are rounded to tbe nearest microsecond. In the future we
may change the underlying alarm subsystem to be nanosecond-based, at
which time we will update the precision of this sleep call.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/ros/bits/syscall.h
kern/src/syscall.c