Bug #1351

kern_time syscall separation

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

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

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

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

History

#1 Updated by dillon over 5 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

#2 Updated by dillon over 5 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

Also available in: Atom PDF