Syscall clock_gettime and clock_getres implementaion
PATCH 1/1 Syscall clock_gettime and clock_getres implementaion
Patch in the attachment
linux-user/syscall.c +22 -0
@@ -4163,6 +4163,28 @@case TARGET_NR_getdomainname: goto unimplemented_nowarn;#endif +#ifdef TARGET_NR_clock_gettime +case TARGET_NR_clock_gettime: + { +struct timespec ts; + ret =get_errno (clock_gettime (arg1, &ts)); +if (!is_error (ret)) { +host_to_target_timespec (arg2, &ts); + } +break ; + } +#endif +#ifdef TARGET_NR_clock_getres +case TARGET_NR_clock_getres: + { +struct timespec ts; + ret =get_errno (clock_getres (arg1, &ts)); +if (!is_error (ret)) { +host_to_target_timespec (arg2, &ts); + } +break ; + } +#endif default : unimplemented:gemu_log ("qemu: Unsupported syscall: %d\n" , num);
Makefile.target +1 -0
@@ -206,6 +206,7 @@ ifdef CONFIG_LINUX_USER OBJS= main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o \ elfload.o linuxload.o +LIBS+= -lrt ifdef TARGET_HAS_BFLT OBJS+= flatload.o endif
Quoted 1 line · Kirill A. Shutemov
Patch in the attachment
It's Implentation of two syscall clock_gettime and clock_getres using function from librt.