Skip to content

Commit

Permalink
Add stub for stime
Browse files Browse the repository at this point in the history
  • Loading branch information
saagarjha committed Mar 10, 2019
1 parent 53de7f3 commit fd51dfb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions kernel/calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ syscall_t syscall_table[] = {
[21] = (syscall_t) sys_mount,
[23] = (syscall_t) sys_setuid,
[24] = (syscall_t) sys_getuid,
[25] = (syscall_t) sys_stime,
[33] = (syscall_t) sys_access,
[36] = (syscall_t) syscall_success_stub, // sync
[37] = (syscall_t) sys_kill,
Expand Down
4 changes: 4 additions & 0 deletions kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ dword_t sys_time(addr_t time_out) {
return now;
}

dword_t sys_stime(addr_t time) {
return _EPERM;
}

dword_t sys_clock_gettime(dword_t clock, addr_t tp) {
STRACE("clock_gettime(%d, 0x%x)", clock, tp);

Expand Down
3 changes: 2 additions & 1 deletion kernel/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "misc.h"

dword_t sys_time(addr_t time_out);
dword_t sys_stime(addr_t time);
#define CLOCK_REALTIME_ 0
#define CLOCK_MONOTONIC_ 1
#define CLOCK_PROCESS_CPUTIME_ID_ 2
Expand Down Expand Up @@ -40,7 +41,7 @@ struct tms_ {

dword_t sys_getitimer(dword_t which, addr_t val);
dword_t sys_setitimer(dword_t which, addr_t new_val, addr_t old_val);
dword_t sys_times( addr_t tbuf);
dword_t sys_times(addr_t tbuf);
dword_t sys_nanosleep(addr_t req, addr_t rem);
dword_t sys_gettimeofday(addr_t tv, addr_t tz);
dword_t sys_settimeofday(addr_t tv, addr_t tz);
Expand Down

0 comments on commit fd51dfb

Please sign in to comment.