Project

General

Profile

Actions

Bug #1351

closed

kern_time syscall separation

Added by mokamaru over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hello,

Attached patch separates 3 syscalls: sys_clock_gettime,
sys_clock_settime and sys_clock_getres into 2-level functions.
The new functions introduced are kern_clock_gettime,
kern_clock_settime and kern_clock_getres.

This is useful especially for linux emulation codes where they call
the kern_clock* version directly instead of having to do the stackgap,
and then sys_clock*.

Regards,
M. Farid Kamarudin


Files

kern_time.patch (3.93 KB) kern_time.patch mokamaru, 04/28/2009 04:07 PM
Actions #1

Updated by dillon over 15 years ago

:Hello,
:
:Attached patch separates 3 syscalls: sys_clock_gettime,
:sys_clock_settime and sys_clock_getres into 2-level functions.
:The new functions introduced are kern_clock_gettime,
:kern_clock_settime and kern_clock_getres.
:
:This is useful especially for linux emulation codes where they call
:the kern_clock* version directly instead of having to do the stackgap,
:and then sys_clock*.
:
:Regards,
:M. Farid Kamarudin

Thanks for the patch!  Very nicely done, I will commit it.
-Matt
Actions #2

Updated by dillon over 15 years ago

Oh, I made some small modifications and a bug fix or three to the
patch.

I put the kern_* prototypes in sys/kern_syscall.h instead of sys/time.h.
The switch in kern_clock_gettime() was missing 'break;' statements.
The copyout() in sys_clock_gettime() was missing a semicolon.
The switch in kern_clock_getres() was missing a 'break;' statment.
Otherwise it looks ok.
Generally speaking please try to test patches before submitting :-)
-Matt
Actions

Also available in: Atom PDF