From 075f3cffae22d4542aa89d2ef764a2b186523587 Mon Sep 17 00:00:00 2001 From: alfred Date: Thu, 19 Sep 2002 00:48:57 +0000 Subject: [PATCH] Regen for added syscalls. --- sys/conf/NOTES | 1 + sys/conf/files | 1 + sys/conf/options | 1 + sys/kern/init_sysent.c | 14 ++++++++++++++ sys/kern/syscalls.c | 14 ++++++++++++++ sys/sys/syscall.h | 11 ++++++++++- sys/sys/syscall.mk | 11 ++++++++++- sys/sys/sysproto.h | 44 +++++++++++++++++++++++++++++++++++++++++- 8 files changed, 94 insertions(+), 3 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index b2bf7ab42099..458c37c2a35b 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -746,6 +746,7 @@ device random options P1003_1B options _KPOSIX_PRIORITY_SCHEDULING options _KPOSIX_VERSION=199309L +options P1003_1B_SEMAPHORES ##################################################################### diff --git a/sys/conf/files b/sys/conf/files index 38a4ecf10c58..faee80deacda 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1379,6 +1379,7 @@ pci/xrpu.c optional xrpu posix4/ksched.c optional _kposix_priority_scheduling posix4/p1003_1b.c standard posix4/posix4_mib.c standard +kern/uipc_sem.c optional p1003_1b_semaphores security/mac_none/mac_none.c optional mac_none ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs diff --git a/sys/conf/options b/sys/conf/options index a5dd83ec50c8..d02b621a4441 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -132,6 +132,7 @@ WLDEBUG opt_wavelan.h P1003_1B opt_posix.h _KPOSIX_PRIORITY_SCHEDULING opt_posix.h _KPOSIX_VERSION opt_posix.h +P1003_1B_SEMAPHORES opt_posix.h ##################################################################### # SECURITY POLICY PARAMETERS diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 99312fc93104..e9be43b28234 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -423,4 +423,18 @@ struct sysent sysent[] = { { AS(uuidgen_args), (sy_call_t *)uuidgen }, /* 392 = uuidgen */ { SYF_MPSAFE | AS(sendfile_args), (sy_call_t *)sendfile }, /* 393 = sendfile */ { SYF_MPSAFE | AS(mac_syscall_args), (sy_call_t *)mac_syscall }, /* 394 = mac_syscall */ + { 0, (sy_call_t *)nosys }, /* 395 = nosys */ + { 0, (sy_call_t *)nosys }, /* 396 = nosys */ + { 0, (sy_call_t *)nosys }, /* 397 = nosys */ + { 0, (sy_call_t *)nosys }, /* 398 = nosys */ + { 0, (sy_call_t *)nosys }, /* 399 = nosys */ + { SYF_MPSAFE | AS(ksem_close_args), (sy_call_t *)lkmressys }, /* 400 = ksem_close */ + { SYF_MPSAFE | AS(ksem_post_args), (sy_call_t *)lkmressys }, /* 401 = ksem_post */ + { SYF_MPSAFE | AS(ksem_wait_args), (sy_call_t *)lkmressys }, /* 402 = ksem_wait */ + { SYF_MPSAFE | AS(ksem_trywait_args), (sy_call_t *)lkmressys }, /* 403 = ksem_trywait */ + { SYF_MPSAFE | AS(ksem_init_args), (sy_call_t *)lkmressys }, /* 404 = ksem_init */ + { SYF_MPSAFE | AS(ksem_open_args), (sy_call_t *)lkmressys }, /* 405 = ksem_open */ + { SYF_MPSAFE | AS(ksem_unlink_args), (sy_call_t *)lkmressys }, /* 406 = ksem_unlink */ + { SYF_MPSAFE | AS(ksem_getvalue_args), (sy_call_t *)lkmressys }, /* 407 = ksem_getvalue */ + { SYF_MPSAFE | AS(ksem_destroy_args), (sy_call_t *)lkmressys }, /* 408 = ksem_destroy */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index efe25be6757c..701c4552eb9c 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -402,4 +402,18 @@ char *syscallnames[] = { "uuidgen", /* 392 = uuidgen */ "sendfile", /* 393 = sendfile */ "mac_syscall", /* 394 = mac_syscall */ + "#395", /* 395 = nosys */ + "#396", /* 396 = nosys */ + "#397", /* 397 = nosys */ + "#398", /* 398 = nosys */ + "#399", /* 399 = nosys */ + "ksem_close", /* 400 = ksem_close */ + "ksem_post", /* 401 = ksem_post */ + "ksem_wait", /* 402 = ksem_wait */ + "ksem_trywait", /* 403 = ksem_trywait */ + "ksem_init", /* 404 = ksem_init */ + "ksem_open", /* 405 = ksem_open */ + "ksem_unlink", /* 406 = ksem_unlink */ + "ksem_getvalue", /* 407 = ksem_getvalue */ + "ksem_destroy", /* 408 = ksem_destroy */ }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 7496035264a3..c2bd5781ebaa 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -308,4 +308,13 @@ #define SYS_uuidgen 392 #define SYS_sendfile 393 #define SYS_mac_syscall 394 -#define SYS_MAXSYSCALL 395 +#define SYS_ksem_close 400 +#define SYS_ksem_post 401 +#define SYS_ksem_wait 402 +#define SYS_ksem_trywait 403 +#define SYS_ksem_init 404 +#define SYS_ksem_open 405 +#define SYS_ksem_unlink 406 +#define SYS_ksem_getvalue 407 +#define SYS_ksem_destroy 408 +#define SYS_MAXSYSCALL 409 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 6e150201e66d..15920c69a8d5 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -256,4 +256,13 @@ MIASM = \ lchflags.o \ uuidgen.o \ sendfile.o \ - mac_syscall.o + mac_syscall.o \ + ksem_close.o \ + ksem_post.o \ + ksem_wait.o \ + ksem_trywait.o \ + ksem_init.o \ + ksem_open.o \ + ksem_unlink.o \ + ksem_getvalue.o \ + ksem_destroy.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index dacce335ca05..e389b02fa79d 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -10,8 +10,8 @@ #define _SYS_SYSPROTO_H_ #include - #include +#include struct proc; @@ -1124,6 +1124,39 @@ struct mac_syscall_args { char call_l_[PADL_(int)]; int call; char call_r_[PADR_(int)]; char arg_l_[PADL_(void *)]; void * arg; char arg_r_[PADR_(void *)]; }; +struct ksem_close_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; +struct ksem_post_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; +struct ksem_wait_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; +struct ksem_trywait_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; +struct ksem_init_args { + char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; +}; +struct ksem_open_args { + char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char oflag_l_[PADL_(int)]; int oflag; char oflag_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; + char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; +}; +struct ksem_unlink_args { + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; +}; +struct ksem_getvalue_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; + char val_l_[PADL_(int *)]; int * val; char val_r_[PADR_(int *)]; +}; +struct ksem_destroy_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_exit(struct thread *, struct sys_exit_args *); int fork(struct thread *, struct fork_args *); @@ -1377,6 +1410,15 @@ int lchflags(struct thread *, struct lchflags_args *); int uuidgen(struct thread *, struct uuidgen_args *); int sendfile(struct thread *, struct sendfile_args *); int mac_syscall(struct thread *, struct mac_syscall_args *); +int ksem_close(struct thread *, struct ksem_close_args *); +int ksem_post(struct thread *, struct ksem_post_args *); +int ksem_wait(struct thread *, struct ksem_wait_args *); +int ksem_trywait(struct thread *, struct ksem_trywait_args *); +int ksem_init(struct thread *, struct ksem_init_args *); +int ksem_open(struct thread *, struct ksem_open_args *); +int ksem_unlink(struct thread *, struct ksem_unlink_args *); +int ksem_getvalue(struct thread *, struct ksem_getvalue_args *); +int ksem_destroy(struct thread *, struct ksem_destroy_args *); #ifdef COMPAT_43