Russell King - ARM Linux wrote:
On Mon, Dec 22, 2003 at 02:57:00PM +0000, Russell King - ARM Linux wrote:
On Mon, Dec 22, 2003 at 08:46:45AM -0600, crowe@xxxxxxxxxxxxxxxx wrote:
Hello
Question. I'm working from the 2.6.0-test8-rmk1 kernel. I want to access
sys_clock_gettime, but it doesn't appear to be in calls.S/unistd.h. Am I
missing something here? Is there another way of getting user access to
this kernel call?
Thanks for finding this; it isn't part of the ARM kernel userspace
interface yet, and needs a syscall number allocating. This can only
happen in the current kernel.
Thanks. Looks like a winner to me!
However, this patch (against 2.6.0-rmk2) may apply to your kernel version
as well. No guarantees that the resulting kernel will link though.
diff -u -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x '*.orig' -x '*.rej'
ref/arch/arm/kernel/calls.S linux/arch/arm/kernel/calls.S
--- ref/arch/arm/kernel/calls.S Wed Feb 12 17:02:16 2003
+++ linux/arch/arm/kernel/calls.S Mon Dec 22 14:59:08 2003
@@ -271,6 +271,20 @@
.long sys_ni_syscall /* sys_set_thread_area */
/* 255 */ .long sys_ni_syscall /* sys_get_thread_area */
.long sys_ni_syscall /* sys_set_tid_address */
+ .long sys_timer_create
+ .long sys_timer_settime
+ .long sys_timer_gettime
+/* 260 */ .long sys_timer_getoverrun
+ .long sys_timer_delete
+ .long sys_clock_settime
+ .long sys_clock_gettime
+ .long sys_clock_getres
+/* 265 */ .long sys_clock_nanosleep
+ .long sys_statfs64
+ .long sys_fstatfs64
+ .long sys_tgkill
+ .long sys_utimes
+/* 270 */ .long sys_fadvise64_64
__syscall_end:
.rept NR_syscalls - (__syscall_end - __syscall_start) / 4
diff -u -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x '*.orig' -x '*.rej'
ref/include/asm-arm/unistd.h linux/include/asm-arm/unistd.h
--- ref/include/asm-arm/unistd.h Sat Oct 4 20:42:02 2003
+++ linux/include/asm-arm/unistd.h Mon Dec 22 15:02:07 2003
@@ -282,6 +282,20 @@
/* 254 for set_thread_area */
/* 255 for get_thread_area */
/* 256 for set_tid_address */
+#define __NR_timer_create (__NR_SYSCALL_BASE+257)
+#define __NR_timer_settime (__NR_SYSCALL_BASE+258)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE+259)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260)
+#define __NR_timer_delete (__NR_SYSCALL_BASE+261)
+#define __NR_clock_settime (__NR_SYSCALL_BASE+262)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE+263)
+#define __NR_clock_getres (__NR_SYSCALL_BASE+264)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265)
+#define __NR_statfs64 (__NR_SYSCALL_BASE+266)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE+267)
+#define __NR_tgkill (__NR_SYSCALL_BASE+268)
+#define __NR_utimes (__NR_SYSCALL_BASE+269)
+#define __NR_fadvise64_64 (__NR_SYSCALL_BASE+270)
/*
* The following SWIs are ARM private.
--
Mike Crowe
crowe@xxxxxxxxxxxxxxxx
-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette: http://www.arm.linux.org.uk/armlinux/mailinglists.php
|