diff options
Diffstat (limited to 'sys/kern')
| -rw-r--r-- | sys/kern/init_main.c | 2 | ||||
| -rw-r--r-- | sys/kern/kern_acct.c | 6 | ||||
| -rw-r--r-- | sys/kern/kern_fork.c | 2 | ||||
| -rw-r--r-- | sys/kern/kern_idle.c | 6 | ||||
| -rw-r--r-- | sys/kern/kern_intr.c | 12 | ||||
| -rw-r--r-- | sys/kern/kern_kthread.c | 14 | ||||
| -rw-r--r-- | sys/kern/kern_shutdown.c | 2 | ||||
| -rw-r--r-- | sys/kern/subr_taskqueue.c | 8 | ||||
| -rw-r--r-- | sys/kern/vfs_aio.c | 4 | ||||
| -rw-r--r-- | sys/kern/vfs_bio.c | 2 | ||||
| -rw-r--r-- | sys/kern/vfs_subr.c | 4 |
11 files changed, 31 insertions, 31 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 0eb26ecdad72..ef404b32554a 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -691,7 +691,7 @@ start_init(void *dummy) } /* - * Like kthread_create(), but runs in it's own address space. + * Like kproc_create(), but runs in it's own address space. * We do this early to reserve pid 1. * * Note special case - do not make it runnable yet. Other work diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index 1c3fba0ebf33..17a74c4368c0 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -283,7 +283,7 @@ acct(struct thread *td, struct acct_args *uap) * than one, but if so the extras will commit suicide as * soon as they start up. */ - error = kthread_create(acct_thread, NULL, NULL, 0, 0, + error = kproc_create(acct_thread, NULL, NULL, 0, 0, "accounting"); if (error) { vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount); @@ -625,7 +625,7 @@ acct_thread(void *dummy) sx_xlock(&acct_sx); if (acct_state & ACCT_RUNNING) { sx_xunlock(&acct_sx); - kthread_exit(0); + kproc_exit(0); } acct_state |= ACCT_RUNNING; @@ -652,5 +652,5 @@ acct_thread(void *dummy) */ acct_state = 0; sx_xunlock(&acct_sx); - kthread_exit(0); + kproc_exit(0); } diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index e6f4d1510be3..eeb02efd02b1 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -802,7 +802,7 @@ fork_exit(callout, arg, frame) if (p->p_flag & P_KTHREAD) { printf("Kernel thread \"%s\" (pid %d) exited prematurely.\n", p->p_comm, p->p_pid); - kthread_exit(0); + kproc_exit(0); } mtx_assert(&Giant, MA_NOTOWNED); diff --git a/sys/kern/kern_idle.c b/sys/kern/kern_idle.c index 7d0925ee9579..43ce37a2faee 100644 --- a/sys/kern/kern_idle.c +++ b/sys/kern/kern_idle.c @@ -60,16 +60,16 @@ idle_setup(void *dummy) #ifdef SMP SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { - error = kthread_create(sched_idletd, NULL, &p, + error = kproc_create(sched_idletd, NULL, &p, RFSTOPPED | RFHIGHPID, 0, "idle: cpu%d", pc->pc_cpuid); pc->pc_idlethread = FIRST_THREAD_IN_PROC(p); #else - error = kthread_create(sched_idletd, NULL, &p, + error = kproc_create(sched_idletd, NULL, &p, RFSTOPPED | RFHIGHPID, 0, "idle"); PCPU_SET(idlethread, FIRST_THREAD_IN_PROC(p)); #endif if (error) - panic("idle_setup: kthread_create error %d\n", error); + panic("idle_setup: kproc_create error %d\n", error); PROC_LOCK(p); p->p_flag |= P_NOLOAD; diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index d754440c3c15..ae749766561f 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -337,10 +337,10 @@ ithread_create(const char *name) ithd = malloc(sizeof(struct intr_thread), M_ITHREAD, M_WAITOK | M_ZERO); - error = kthread_create(ithread_loop, ithd, &p, RFSTOPPED | RFHIGHPID, + error = kproc_create(ithread_loop, ithd, &p, RFSTOPPED | RFHIGHPID, 0, "%s", name); if (error) - panic("kthread_create() failed with %d", error); + panic("kproc_create() failed with %d", error); td = FIRST_THREAD_IN_PROC(p); /* XXXKSE */ thread_lock(td); sched_class(td, PRI_ITHD); @@ -362,10 +362,10 @@ ithread_create(const char *name, struct intr_handler *ih) ithd = malloc(sizeof(struct intr_thread), M_ITHREAD, M_WAITOK | M_ZERO); - error = kthread_create(ithread_loop, ih, &p, RFSTOPPED | RFHIGHPID, + error = kproc_create(ithread_loop, ih, &p, RFSTOPPED | RFHIGHPID, 0, "%s", name); if (error) - panic("kthread_create() failed with %d", error); + panic("kproc_create() failed with %d", error); td = FIRST_THREAD_IN_PROC(p); /* XXXKSE */ thread_lock(td); sched_class(td, PRI_ITHD); @@ -1102,7 +1102,7 @@ ithread_loop(void *arg) CTR3(KTR_INTR, "%s: pid %d (%s) exiting", __func__, p->p_pid, p->p_comm); free(ithd, M_ITHREAD); - kthread_exit(0); + kproc_exit(0); } /* @@ -1173,7 +1173,7 @@ ithread_loop(void *arg) CTR3(KTR_INTR, "%s: pid %d (%s) exiting", __func__, p->p_pid, p->p_comm); free(ithd, M_ITHREAD); - kthread_exit(0); + kproc_exit(0); } /* diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index 03f7f47020b3..a9359359dabd 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -56,7 +56,7 @@ kproc_start(udata) const struct kproc_desc *kp = udata; int error; - error = kthread_create((void (*)(void *))kp->func, NULL, + error = kproc_create((void (*)(void *))kp->func, NULL, kp->global_procpp, 0, 0, "%s", kp->arg0); if (error) panic("kproc_start: %s: error %d", kp->arg0, error); @@ -73,7 +73,7 @@ kproc_start(udata) * fmt and following will be *printf'd into (*newpp)->p_comm (for ps, etc.). */ int -kthread_create(void (*func)(void *), void *arg, +kproc_create(void (*func)(void *), void *arg, struct proc **newpp, int flags, int pages, const char *fmt, ...) { int error; @@ -82,7 +82,7 @@ kthread_create(void (*func)(void *), void *arg, struct proc *p2; if (!proc0.p_stats) - panic("kthread_create called too soon"); + panic("kproc_create called too soon"); error = fork1(&thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, pages, &p2); @@ -122,7 +122,7 @@ kthread_create(void (*func)(void *), void *arg, } void -kthread_exit(int ecode) +kproc_exit(int ecode) { struct thread *td; struct proc *p; @@ -154,7 +154,7 @@ kthread_exit(int ecode) * Participation is voluntary. */ int -kthread_suspend(struct proc *p, int timo) +kproc_suspend(struct proc *p, int timo) { /* * Make sure this is indeed a system process and we can safely @@ -171,7 +171,7 @@ kthread_suspend(struct proc *p, int timo) } int -kthread_resume(struct proc *p) +kproc_resume(struct proc *p) { /* * Make sure this is indeed a system process and we can safely @@ -189,7 +189,7 @@ kthread_resume(struct proc *p) } void -kthread_suspend_check(struct proc *p) +kproc_suspend_check(struct proc *p) { PROC_LOCK(p); while (SIGISMEMBER(p->p_siglist, SIGSTOP)) { diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index bb54faa732d3..bd1aeaf35915 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -608,7 +608,7 @@ kproc_shutdown(void *arg, int howto) strlcpy(procname, p->p_comm, sizeof(procname)); printf("Waiting (max %d seconds) for system process `%s' to stop...", kproc_shutdown_wait, procname); - error = kthread_suspend(p, kproc_shutdown_wait * hz); + error = kproc_suspend(p, kproc_shutdown_wait * hz); if (error == EWOULDBLOCK) printf("timed out\n"); diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index 3e210ccbf23f..c3ddb5f38765 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -336,14 +336,14 @@ taskqueue_start_threads(struct taskqueue **tqp, int count, int pri, for (i = 0; i < count; i++) { if (count == 1) - error = kthread_create(taskqueue_thread_loop, tqp, + error = kproc_create(taskqueue_thread_loop, tqp, &tq->tq_pproc[i], RFSTOPPED, 0, ktname); else - error = kthread_create(taskqueue_thread_loop, tqp, + error = kproc_create(taskqueue_thread_loop, tqp, &tq->tq_pproc[i], RFSTOPPED, 0, "%s_%d", ktname, i); if (error) { /* should be ok to continue, taskqueue_free will dtrt */ - printf("%s: kthread_create(%s): error %d", + printf("%s: kproc_create(%s): error %d", __func__, ktname, error); tq->tq_pproc[i] = NULL; /* paranoid */ } else @@ -379,7 +379,7 @@ taskqueue_thread_loop(void *arg) tq->tq_pcount--; wakeup_one(tq->tq_pproc); TQ_UNLOCK(tq); - kthread_exit(0); + kproc_exit(0); } void diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 842b43570412..264f291c040a 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -1122,7 +1122,7 @@ aio_daemon(void *_id) mycp->p_vmspace->vm_refcnt); } #endif - kthread_exit(0); + kproc_exit(0); } } } @@ -1143,7 +1143,7 @@ aio_newproc(int *start) int id; id = alloc_unr(aiod_unr); - error = kthread_create(aio_daemon, (void *)(intptr_t)id, &p, + error = kproc_create(aio_daemon, (void *)(intptr_t)id, &p, RFNOWAIT, 0, "aiod%d", id); if (error == 0) { /* diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index d3344597f418..ce59df65b259 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2058,7 +2058,7 @@ buf_daemon() bd_request = 0; mtx_unlock(&bdlock); - kthread_suspend_check(bufdaemonproc); + kproc_suspend_check(bufdaemonproc); /* * Do the flush. Limit the amount of in-transit I/O we diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9c168d72d143..fce5beb4a721 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -726,7 +726,7 @@ vnlru_proc(void) SHUTDOWN_PRI_FIRST); for (;;) { - kthread_suspend_check(p); + kproc_suspend_check(p); mtx_lock(&vnode_free_list_mtx); if (freevnodes > wantfreevnodes) vnlru_free(freevnodes - wantfreevnodes); @@ -1688,7 +1688,7 @@ sched_sync(void) if (syncer_state == SYNCER_FINAL_DELAY && syncer_final_iter == 0) { mtx_unlock(&sync_mtx); - kthread_suspend_check(td->td_proc); + kproc_suspend_check(td->td_proc); mtx_lock(&sync_mtx); } net_worklist_len = syncer_worklist_len - sync_vnode_count; |
