Fri Apr 4 18:24:12 2014 UTC ()
Add support for timing syscalls.


(njoly)
diff -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c
diff -r1.13 -r1.14 src/sys/rump/kern/lib/libsys_linux/syscalls.master

cvs diff -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c (expand / switch to unified diff)

--- src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c 2014/03/13 02:03:47 1.1
+++ src/sys/rump/kern/lib/libsys_linux/sys_linux_component.c 2014/04/04 18:24:12 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sys_linux_component.c,v 1.1 2014/03/13 02:03:47 pooka Exp $ */ 1/* $NetBSD: sys_linux_component.c,v 1.2 2014/04/04 18:24:12 njoly Exp $ */
2 2
3#include <sys/param.h> 3#include <sys/param.h>
4#include <sys/proc.h> 4#include <sys/proc.h>
5 5
6#include <compat/linux/common/linux_errno.h> 6#include <compat/linux/common/linux_errno.h>
7 7
8#include <uvm/uvm_extern.h> 8#include <uvm/uvm_extern.h>
9 9
10#include "rump_private.h" 10#include "rump_private.h"
11 11
12#include "rump_linux_syscall.h" 12#include "rump_linux_syscall.h"
13 13
14extern struct sysent rump_linux_sysent[]; 14extern struct sysent rump_linux_sysent[];
@@ -48,34 +48,26 @@ dev_t @@ -48,34 +48,26 @@ dev_t
48linux_fakedev(dev_t in, int raw) 48linux_fakedev(dev_t in, int raw)
49{ 49{
50 50
51 /* I don't really think it matters what we return here */ 51 /* I don't really think it matters what we return here */
52 return in; 52 return in;
53} 53}
54 54
55/* 55/*
56 * XXX: the linux emulation code is not split into factions 56 * XXX: the linux emulation code is not split into factions
57 */ 57 */
58void rumplinux__stub(void); 58void rumplinux__stub(void);
59void rumplinux__stub(void) {panic("unavailable");} 59void rumplinux__stub(void) {panic("unavailable");}
60 60
61/* timing */ 
62__weak_alias(clock_gettime1,rumplinux__stub); 
63__weak_alias(clock_settime1,rumplinux__stub); 
64__weak_alias(clock_getres1,rumplinux__stub); 
65__weak_alias(compat_50_sys_gettimeofday,rumplinux__stub); 
66__weak_alias(compat_50_sys_settimeofday,rumplinux__stub); 
67__weak_alias(nanosleep1,rumplinux__stub); 
68 
69/* vm-related */ 61/* vm-related */
70__weak_alias(sys_mmap,rumplinux__stub); 62__weak_alias(sys_mmap,rumplinux__stub);
71__weak_alias(vm_map_unlock,rumplinux__stub); 63__weak_alias(vm_map_unlock,rumplinux__stub);
72__weak_alias(uvm_map_lookup_entry,rumplinux__stub); 64__weak_alias(uvm_map_lookup_entry,rumplinux__stub);
73__weak_alias(sys_obreak,rumplinux__stub); 65__weak_alias(sys_obreak,rumplinux__stub);
74__weak_alias(vm_map_lock,rumplinux__stub); 66__weak_alias(vm_map_lock,rumplinux__stub);
75__weak_alias(uvm_mremap,rumplinux__stub); 67__weak_alias(uvm_mremap,rumplinux__stub);
76 68
77/* signal.c */ 69/* signal.c */
78__weak_alias(sigaction1,rumplinux__stub); 70__weak_alias(sigaction1,rumplinux__stub);
79__weak_alias(kpsignal2,rumplinux__stub); 71__weak_alias(kpsignal2,rumplinux__stub);
80__weak_alias(sys_kill,rumplinux__stub); 72__weak_alias(sys_kill,rumplinux__stub);
81__weak_alias(sigsuspend1,rumplinux__stub); 73__weak_alias(sigsuspend1,rumplinux__stub);

cvs diff -r1.13 -r1.14 src/sys/rump/kern/lib/libsys_linux/syscalls.master (expand / switch to unified diff)

--- src/sys/rump/kern/lib/libsys_linux/syscalls.master 2014/01/25 10:30:22 1.13
+++ src/sys/rump/kern/lib/libsys_linux/syscalls.master 2014/04/04 18:24:12 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.13 2014/01/25 10:30:22 njoly Exp $ 1 $NetBSD: syscalls.master,v 1.14 2014/04/04 18:24:12 njoly Exp $
2 2
3; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 3; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
4 4
5; NetBSD system call name/number "master" file. 5; NetBSD system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.) 6; (See syscalls.conf to see what it is processed into.)
7; 7;
8; Fields: number type [type-dependent ...] 8; Fields: number type [type-dependent ...]
9; number system call number, must be in order 9; number system call number, must be in order
10; type one of NODEF, UNIMPL, or NOARGS 10; type one of NODEF, UNIMPL, or NOARGS
11; 11;
12; types: 12; types:
13; NODEF always included 13; NODEF always included
14; UNIMPL unimplemented, not included in system 14; UNIMPL unimplemented, not included in system
@@ -530,45 +530,52 @@ @@ -530,45 +530,52 @@
530407 UNIMPL 530407 UNIMPL
531408 UNIMPL 531408 UNIMPL
532409 UNIMPL 532409 UNIMPL
533 533
534410 UNIMPL mount 534410 UNIMPL mount
535411 UNIMPL mremap 535411 UNIMPL mremap
536 536
537; Processor-sets system calls 537; Processor-sets system calls
538412 UNIMPL pset_create 538412 UNIMPL pset_create
539413 UNIMPL pset_destroy 539413 UNIMPL pset_destroy
540414 UNIMPL pset_assign 540414 UNIMPL pset_assign
541415 UNIMPL _pset_bind 541415 UNIMPL _pset_bind
542416 UNIMPL fadvise 542416 UNIMPL fadvise
543417 NOARGS { int|linux_sys||select(int nd, \ 543417 NOARGS { int|linux_sys||select(int nd, \
544 fd_set *in, fd_set *ou, fd_set *ex, \ 544 fd_set *in, fd_set *ou, fd_set *ex, \
545 struct timeval50 *tv); } 545 struct timeval50 *tv); }
546418 UNIMPL gettimeofday 546418 NOARGS { int|linux_sys||gettimeofday(struct timeval50 *tp, \
547419 UNIMPL settimeofday 547 struct timezone *tzp); }
 548419 NOARGS { int|linux_sys||settimeofday(struct timeval50 *tp, \
 549 struct timezone *tzp); }
548420 NOARGS { int|linux_sys||utimes(const char *path, \ 550420 NOARGS { int|linux_sys||utimes(const char *path, \
549 struct linux_timeval *tv); } 551 struct linux_timeval *tv); }
550421 UNIMPL adjtime 552421 UNIMPL adjtime
551422 UNIMPL lfs_segwait 553422 UNIMPL lfs_segwait
552423 NOARGS { int|sys|50|futimes(int fd, \ 554423 NOARGS { int|sys|50|futimes(int fd, \
553 const struct timeval *tptr); } 555 const struct timeval *tptr); }
554424 NOARGS { int|sys|50|lutimes(const char *path, \ 556424 NOARGS { int|sys|50|lutimes(const char *path, \
555 const struct timeval *tptr); } 557 const struct timeval *tptr); }
556425 UNIMPL setitimer 558425 UNIMPL setitimer
557426 UNIMPL getitimer 559426 UNIMPL getitimer
558427 UNIMPL clock_gettime 560427 NOARGS { int|linux_sys||clock_gettime(clockid_t which, \
559428 UNIMPL clock_settime 561 struct linux_timespec *tp); }
560429 UNIMPL clock_getres 562428 NOARGS { int|linux_sys||clock_settime(clockid_t which, \
561430 UNIMPL nanosleep 563 struct linux_timespec *tp); }
 564429 NOARGS { int|linux_sys||clock_getres(clockid_t which, \
 565 struct linux_timespec *tp); }
 566430 NOARGS { int|linux_sys||nanosleep( \
 567 const struct linux_timespec *rqtp, \
 568 struct linux_timespec *rmtp); }
562431 UNIMPL __sigtimedwait 569431 UNIMPL __sigtimedwait
563432 UNIMPL mq_timedsend 570432 UNIMPL mq_timedsend
564433 UNIMPL mq_timedreceive 571433 UNIMPL mq_timedreceive
565434 UNIMPL _lwp_park 572434 UNIMPL _lwp_park
566435 UNIMPL kevent 573435 UNIMPL kevent
567436 UNIMPL pselect 574436 UNIMPL pselect
568437 NOARGS { int|linux_sys||ppoll(struct pollfd *fds, \ 575437 NOARGS { int|linux_sys||ppoll(struct pollfd *fds, \
569 u_int nfds, const struct linux_timespec *timeout, \ 576 u_int nfds, const struct linux_timespec *timeout, \
570 const linux_sigset_t *mask);} 577 const linux_sigset_t *mask);}
571438 UNIMPL aio_suspend 578438 UNIMPL aio_suspend
572439 NOARGS { int|linux_sys||stat64(const char *path, \ 579439 NOARGS { int|linux_sys||stat64(const char *path, \
573 struct linux_stat64 *sp); } 580 struct linux_stat64 *sp); }
574440 NOARGS { int|linux_sys||fstat64(int fd, \ 581440 NOARGS { int|linux_sys||fstat64(int fd, \
@@ -616,13 +623,16 @@ @@ -616,13 +623,16 @@
616468 NOARGS { int|linux_sys||openat(int fd, const char *path, \ 623468 NOARGS { int|linux_sys||openat(int fd, const char *path, \
617 int flags, ... mode_t mode); } 624 int flags, ... mode_t mode); }
618469 NOARGS { int|sys||readlinkat(int fd, const char *path, \ 625469 NOARGS { int|sys||readlinkat(int fd, const char *path, \
619 char *buf, size_t bufsize); } 626 char *buf, size_t bufsize); }
620470 NOARGS { int|sys||symlinkat(const char *path1, int fd, \ 627470 NOARGS { int|sys||symlinkat(const char *path1, int fd, \
621 const char *path2); } 628 const char *path2); }
622471 NOARGS { int|linux_sys||unlinkat(int fd, const char *path, \ 629471 NOARGS { int|linux_sys||unlinkat(int fd, const char *path, \
623 int flag); } 630 int flag); }
624472 UNIMPL futimens 631472 UNIMPL futimens
625473 UNIMPL __quotactl 632473 UNIMPL __quotactl
626474 UNIMPL posix_spawn 633474 UNIMPL posix_spawn
627475 UNIMPL recvmmsg 634475 UNIMPL recvmmsg
628476 UNIMPL sendmmsg 635476 UNIMPL sendmmsg
 636477 NOARGS { int|linux_sys||clock_nanosleep(clockid_t which, \
 637 int flags, struct linux_timespec *rqtp, \
 638 struct linux_timespec *rmtp); }