summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2002-09-25 18:10:42 +0000
committerarchie <archie@FreeBSD.org>2002-09-25 18:10:42 +0000
commit904b65e85dd276aa2fb13c05b6eea79860a6855f (patch)
tree33219152bf2278891abb4870867b5943ed735b0d /sys/kern
parent3df40ef43851716731330fa4b3988b6e3693cf22 (diff)
downloadFreeBSD-src-904b65e85dd276aa2fb13c05b6eea79860a6855f.zip
FreeBSD-src-904b65e85dd276aa2fb13c05b6eea79860a6855f.tar.gz
Make the following name changes to KSE related functions, etc., to better
represent their purpose and minimize namespace conflicts: kse_fn_t -> kse_func_t struct thread_mailbox -> struct kse_thr_mailbox thread_interrupt() -> kse_thr_interrupt() kse_yield() -> kse_release() kse_new() -> kse_create() Add missing declaration of kse_thr_interrupt() to <sys/kse.h>. Regenerate the various generated syscall files. Minor style fixes. Reviewed by: julian
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/init_sysent.c6
-rw-r--r--sys/kern/kern_kse.c6
-rw-r--r--sys/kern/kern_proc.c19
-rw-r--r--sys/kern/kern_thread.c6
-rw-r--r--sys/kern/syscalls.c6
-rw-r--r--sys/kern/syscalls.master8
6 files changed, 26 insertions, 25 deletions
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index e9be43b..dfde1c7 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -409,9 +409,9 @@ struct sysent sysent[] = {
{ AS(nmount_args), (sy_call_t *)nmount }, /* 378 = nmount */
{ 0, (sy_call_t *)kse_exit }, /* 379 = kse_exit */
{ 0, (sy_call_t *)kse_wakeup }, /* 380 = kse_wakeup */
- { AS(kse_new_args), (sy_call_t *)kse_new }, /* 381 = kse_new */
- { AS(thread_wakeup_args), (sy_call_t *)thread_wakeup }, /* 382 = thread_wakeup */
- { SYF_MPSAFE | 0, (sy_call_t *)kse_yield }, /* 383 = kse_yield */
+ { AS(kse_create_args), (sy_call_t *)kse_create }, /* 381 = kse_create */
+ { AS(kse_thr_interrupt_args), (sy_call_t *)kse_thr_interrupt }, /* 382 = kse_thr_interrupt */
+ { SYF_MPSAFE | 0, (sy_call_t *)kse_release }, /* 383 = kse_release */
{ SYF_MPSAFE | AS(__mac_get_proc_args), (sy_call_t *)__mac_get_proc }, /* 384 = __mac_get_proc */
{ SYF_MPSAFE | AS(__mac_set_proc_args), (sy_call_t *)__mac_set_proc }, /* 385 = __mac_set_proc */
{ SYF_MPSAFE | AS(__mac_get_fd_args), (sy_call_t *)__mac_get_fd }, /* 386 = __mac_get_fd */
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index c722498..5d4fcd4 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -339,13 +339,13 @@ thread_export_context(struct thread *td)
#endif
/* Export the user/machine context. */
error = copyin((caddr_t)td->td_mailbox +
- offsetof(struct thread_mailbox, tm_context),
+ offsetof(struct kse_thr_mailbox, tm_context),
&uc,
sizeof(ucontext_t));
if (error == 0) {
thread_getcontext(td, &uc);
error = copyout(&uc, (caddr_t)td->td_mailbox +
- offsetof(struct thread_mailbox, tm_context),
+ offsetof(struct kse_thr_mailbox, tm_context),
sizeof(ucontext_t));
}
@@ -353,7 +353,7 @@ thread_export_context(struct thread *td)
addr1 = (caddr_t)ke->ke_mailbox
+ offsetof(struct kse_mailbox, km_completed);
addr2 = (caddr_t)td->td_mailbox
- + offsetof(struct thread_mailbox , tm_next);
+ + offsetof(struct kse_thr_mailbox, tm_next);
/* Then link it into it's KSE's list of completed threads. */
if (!error) {
error = td2_mbx = fuword(addr1);
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 3a64050..81d9040 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -282,7 +282,7 @@ proc_linkup(struct proc *p, struct ksegrp *kg,
}
int
-thread_wakeup(struct thread *td, struct thread_wakeup_args *uap)
+kse_thr_interrupt(struct thread *td, struct kse_thr_interrupt_args *uap)
{
return(ENOSYS);
@@ -296,7 +296,7 @@ kse_exit(struct thread *td, struct kse_exit_args *uap)
}
int
-kse_yield(struct thread *td, struct kse_yield_args *uap)
+kse_release(struct thread *td, struct kse_release_args *uap)
{
struct thread *td2;
@@ -306,7 +306,7 @@ kse_yield(struct thread *td, struct kse_yield_args *uap)
/* Don't discard the last thread. */
td2 = FIRST_THREAD_IN_PROC(td->td_proc);
- KASSERT(td2 != NULL, ("kse_yield: no threads in our proc"));
+ KASSERT(td2 != NULL, ("kse_release: no threads in our proc"));
if (TAILQ_NEXT(td, td_plist) == NULL)
return (EINVAL);
@@ -318,7 +318,8 @@ kse_yield(struct thread *td, struct kse_yield_args *uap)
return (0);
}
-int kse_wakeup(struct thread *td, struct kse_wakeup_args *uap)
+int
+kse_wakeup(struct thread *td, struct kse_wakeup_args *uap)
{
return(ENOSYS);
@@ -328,12 +329,12 @@ int kse_wakeup(struct thread *td, struct kse_wakeup_args *uap)
* No new KSEG: first call: use current KSE, don't schedule an upcall
* All other situations, do allocate a new KSE and schedule an upcall on it.
*/
-/* struct kse_new_args {
+/* struct kse_create_args {
struct kse_mailbox *mbx;
- int new_grp_flag;
+ int newgroup;
}; */
int
-kse_new(struct thread *td, struct kse_new_args *uap)
+kse_create(struct thread *td, struct kse_create_args *uap)
{
struct kse *newke;
struct ksegrp *newkg;
@@ -358,7 +359,7 @@ kse_new(struct thread *td, struct kse_new_args *uap)
* If newgroup then create the new group.
* Check we have the resources for this.
*/
- if (uap->new_grp_flag) {
+ if (uap->newgroup) {
newkg = ksegrp_alloc();
bzero(&newkg->kg_startzero, RANGEOF(struct ksegrp,
kg_startzero, kg_endzero));
@@ -401,7 +402,7 @@ kse_new(struct thread *td, struct kse_new_args *uap)
PROC_LOCK(p);
if (td->td_proc->p_flag & P_KSES) {
mtx_lock_spin(&sched_lock);
- if (uap->new_grp_flag)
+ if (uap->newgroup)
ksegrp_link(newkg, p);
kse_link(newke, newkg);
if (SIGPENDING(p))
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index c722498..5d4fcd4 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -339,13 +339,13 @@ thread_export_context(struct thread *td)
#endif
/* Export the user/machine context. */
error = copyin((caddr_t)td->td_mailbox +
- offsetof(struct thread_mailbox, tm_context),
+ offsetof(struct kse_thr_mailbox, tm_context),
&uc,
sizeof(ucontext_t));
if (error == 0) {
thread_getcontext(td, &uc);
error = copyout(&uc, (caddr_t)td->td_mailbox +
- offsetof(struct thread_mailbox, tm_context),
+ offsetof(struct kse_thr_mailbox, tm_context),
sizeof(ucontext_t));
}
@@ -353,7 +353,7 @@ thread_export_context(struct thread *td)
addr1 = (caddr_t)ke->ke_mailbox
+ offsetof(struct kse_mailbox, km_completed);
addr2 = (caddr_t)td->td_mailbox
- + offsetof(struct thread_mailbox , tm_next);
+ + offsetof(struct kse_thr_mailbox, tm_next);
/* Then link it into it's KSE's list of completed threads. */
if (!error) {
error = td2_mbx = fuword(addr1);
diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c
index 701c455..763cd4b 100644
--- a/sys/kern/syscalls.c
+++ b/sys/kern/syscalls.c
@@ -388,9 +388,9 @@ char *syscallnames[] = {
"nmount", /* 378 = nmount */
"kse_exit", /* 379 = kse_exit */
"kse_wakeup", /* 380 = kse_wakeup */
- "kse_new", /* 381 = kse_new */
- "thread_wakeup", /* 382 = thread_wakeup */
- "kse_yield", /* 383 = kse_yield */
+ "kse_create", /* 381 = kse_create */
+ "kse_thr_interrupt", /* 382 = kse_thr_interrupt */
+ "kse_release", /* 383 = kse_release */
"__mac_get_proc", /* 384 = __mac_get_proc */
"__mac_set_proc", /* 385 = __mac_set_proc */
"__mac_get_fd", /* 386 = __mac_get_fd */
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index ab9674b..d2b5177 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -549,10 +549,10 @@
int flags); }
379 STD BSD { int kse_exit(void); }
380 STD BSD { int kse_wakeup(void); }
-381 STD BSD { int kse_new(struct kse_mailbox * mbx, \
- int new_grp_flag); }
-382 STD BSD { int thread_wakeup(struct thread_mailbox *tmbx); }
-383 MSTD BSD { int kse_yield(void); }
+381 STD BSD { int kse_create(struct kse_mailbox *mbx, \
+ int newgroup); }
+382 STD BSD { int kse_thr_interrupt(struct kse_thr_mailbox *tmbx); }
+383 MSTD BSD { int kse_release(void); }
384 MSTD BSD { int __mac_get_proc(struct mac *mac_p); }
385 MSTD BSD { int __mac_set_proc(struct mac *mac_p); }
386 MSTD BSD { int __mac_get_fd(int fd, struct mac *mac_p); }
OpenPOWER on IntegriCloud