Implemented the set_real_time_clock() syscall.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5186 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2011bdf831
commit
939f7fbaca
@ -4,6 +4,7 @@
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <kernel.h>
|
||||
#include <ksyscalls.h>
|
||||
#include <syscalls.h>
|
||||
@ -24,6 +25,7 @@
|
||||
#include <ksocket.h>
|
||||
#include <kimage.h>
|
||||
#include <ksignal.h>
|
||||
#include <real_time_clock.h>
|
||||
#include <sys/ioccom.h>
|
||||
#include <sys/socket.h>
|
||||
#include <user_atomic.h>
|
||||
@ -47,12 +49,14 @@
|
||||
#define arg14 (((uint32 *)arg_buffer)[14])
|
||||
#define arg15 (((uint32 *)arg_buffer)[15])
|
||||
|
||||
int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret)
|
||||
|
||||
int
|
||||
syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret)
|
||||
{
|
||||
// dprintf("syscall_dispatcher: thread 0x%x call 0x%x, arg0 0x%x, arg1 0x%x arg2 0x%x arg3 0x%x arg4 0x%x\n",
|
||||
// thread_get_current_thread_id(), call_num, arg0, arg1, arg2, arg3, arg4);
|
||||
|
||||
switch(call_num) {
|
||||
switch (call_num) {
|
||||
case SYSCALL_NULL:
|
||||
*call_ret = 0;
|
||||
break;
|
||||
@ -402,6 +406,12 @@ int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_re
|
||||
(size_t *)arg3, (void *)arg4,
|
||||
(size_t)arg5);
|
||||
break;
|
||||
|
||||
// time calls
|
||||
case SYSCALL_SET_REAL_TIME_CLOCK:
|
||||
_user_set_real_time_clock((uint32)arg0);
|
||||
break;
|
||||
|
||||
/* removed until net code has goneback into build
|
||||
case SYSCALL_SOCKET:
|
||||
*call_ret = socket((int)arg0, (int)arg1, (int)arg2, false);
|
||||
|
@ -124,6 +124,9 @@ SYSCALL6(sys_start_watching, 118)
|
||||
SYSCALL6(sys_stop_watching, 119)
|
||||
SYSCALL2(sys_stop_notifying, 120)
|
||||
|
||||
/* time calls */
|
||||
SYSCALL1(_kern_set_real_time_clock, 138)
|
||||
|
||||
/* VM calls */
|
||||
SYSCALL6(_kern_create_area, 29)
|
||||
SYSCALL5(_kern_clone_area, 30)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright 2002, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Copyright 2002-2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
@ -19,7 +19,7 @@ real_time_clock(void)
|
||||
void
|
||||
set_real_time_clock(uint32 secs)
|
||||
{
|
||||
// ToDo: set_real_time_clock()
|
||||
_kern_set_real_time_clock(secs);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user