aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2007-10-20 23:23:23 +0000
committerJulian Elischer <julian@FreeBSD.org>2007-10-20 23:23:23 +0000
commit3745c395ecae17ef47be82433463d561629220b0 (patch)
tree705ce8283c36af96cf048c799a9c02ee91af62db /sys/dev
parent2b3e7485f683cae86e5b9c773bbaabf920746f0e (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aac/aac.c4
-rw-r--r--sys/dev/acpica/acpi_thermal.c6
-rw-r--r--sys/dev/aic7xxx/aic_osm_lib.c2
-rw-r--r--sys/dev/aic7xxx/aic_osm_lib.h4
-rw-r--r--sys/dev/bktr/msp34xx.c8
-rw-r--r--sys/dev/ciss/ciss.c6
-rw-r--r--sys/dev/fdc/fdc.c4
-rw-r--r--sys/dev/firewire/firewire.c4
-rw-r--r--sys/dev/flash/at45d.c2
-rw-r--r--sys/dev/hptmv/entry.c2
-rw-r--r--sys/dev/hwpmc/hwpmc_logging.c4
-rw-r--r--sys/dev/if_ndis/if_ndis.c2
-rw-r--r--sys/dev/ipmi/ipmi_kcs.c4
-rw-r--r--sys/dev/ipmi/ipmi_smic.c4
-rw-r--r--sys/dev/ipmi/ipmi_ssif.c4
-rw-r--r--sys/dev/iscsi/initiator/isc_sm.c4
-rw-r--r--sys/dev/iscsi/initiator/isc_soc.c4
-rw-r--r--sys/dev/isp/isp_freebsd.c4
-rw-r--r--sys/dev/iwi/if_iwi.c4
-rw-r--r--sys/dev/md/md.c4
-rw-r--r--sys/dev/mmc/mmcsd.c4
-rw-r--r--sys/dev/mpt/mpt.h4
-rw-r--r--sys/dev/mpt/mpt_cam.c2
-rw-r--r--sys/dev/mpt/mpt_raid.c2
-rw-r--r--sys/dev/ofw/ofw_disk.c2
-rw-r--r--sys/dev/pccbb/pccbb.c6
-rw-r--r--sys/dev/pccbb/pccbb_pci.c2
-rw-r--r--sys/dev/random/harvest.c4
-rw-r--r--sys/dev/random/randomdev_soft.c2
-rw-r--r--sys/dev/sound/midi/sequencer.c4
-rw-r--r--sys/dev/usb/usb.c8
-rw-r--r--sys/dev/usb/usb_port.h6
-rw-r--r--sys/dev/utopia/utopia.c4
33 files changed, 65 insertions, 65 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 54c7c1cf5274..01212eb18929 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -354,7 +354,7 @@ aac_attach(struct aac_softc *sc)
sc->aac_dev_t->si_drv1 = sc;
/* Create the AIF thread */
- if (kthread_create((void(*)(void *))aac_command_thread, sc,
+ if (kproc_create((void(*)(void *))aac_command_thread, sc,
&sc->aifthread, 0, 0, "aac%daif", unit))
panic("Could not create AIF thread\n");
@@ -990,7 +990,7 @@ aac_command_thread(struct aac_softc *sc)
mtx_unlock(&sc->aac_io_lock);
wakeup(sc->aac_dev);
- kthread_exit(0);
+ kproc_exit(0);
}
/*
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index 5f50468804da..9c560c87b421 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -301,7 +301,7 @@ acpi_tz_attach(device_t dev)
sc->tz_event = EVENTHANDLER_REGISTER(power_profile_change,
acpi_tz_power_profile, sc, 0);
if (acpi_tz_proc == NULL) {
- error = kthread_create(acpi_tz_thread, NULL, &acpi_tz_proc,
+ error = kproc_create(acpi_tz_thread, NULL, &acpi_tz_proc,
RFHIGHPID, 0, "acpi_thermal");
if (error != 0) {
device_printf(sc->tz_dev, "could not create thread - %d", error);
@@ -1088,7 +1088,7 @@ acpi_tz_cooling_thread(void *arg)
ACPI_LOCK(thermal);
sc->tz_cooling_proc_running = FALSE;
ACPI_UNLOCK(thermal);
- kthread_exit(0);
+ kproc_exit(0);
}
/*
@@ -1121,7 +1121,7 @@ acpi_tz_cooling_thread_start(struct acpi_tz_softc *sc)
if (sc->tz_cooling_proc == NULL) {
snprintf(name, sizeof(name), "acpi_cooling%d",
device_get_unit(sc->tz_dev));
- error = kthread_create(acpi_tz_cooling_thread, sc,
+ error = kproc_create(acpi_tz_cooling_thread, sc,
&sc->tz_cooling_proc, RFHIGHPID, 0, name);
if (error != 0) {
device_printf(sc->tz_dev, "could not create thread - %d", error);
diff --git a/sys/dev/aic7xxx/aic_osm_lib.c b/sys/dev/aic7xxx/aic_osm_lib.c
index 78a7d5693558..b79f18aa0cba 100644
--- a/sys/dev/aic7xxx/aic_osm_lib.c
+++ b/sys/dev/aic7xxx/aic_osm_lib.c
@@ -125,7 +125,7 @@ aic_recovery_thread(void *arg)
aic->platform_data->recovery_thread = NULL;
wakeup(aic->platform_data);
aic_unlock(aic);
- kthread_exit(0);
+ kproc_exit(0);
}
void
diff --git a/sys/dev/aic7xxx/aic_osm_lib.h b/sys/dev/aic7xxx/aic_osm_lib.h
index 434acf3e4bad..b2e591c9c7a8 100644
--- a/sys/dev/aic7xxx/aic_osm_lib.h
+++ b/sys/dev/aic7xxx/aic_osm_lib.h
@@ -127,10 +127,10 @@ aic_wakeup_recovery_thread(struct aic_softc *aic)
/****************************** Kernel Threads ********************************/
#if __FreeBSD_version > 500005
#define aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \
- kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg)
+ kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg)
#else
#define aic_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \
- kthread_create(func, farg, proc_ptr, fmtstr, arg)
+ kproc_create(func, farg, proc_ptr, fmtstr, arg)
#endif
/******************************* Bus Space/DMA ********************************/
diff --git a/sys/dev/bktr/msp34xx.c b/sys/dev/bktr/msp34xx.c
index 940205ac4af8..d86f71459049 100644
--- a/sys/dev/bktr/msp34xx.c
+++ b/sys/dev/bktr/msp34xx.c
@@ -899,7 +899,7 @@ done:
wakeup(&msp->kthread);
mtx_unlock(&Giant);
- kthread_exit(0);
+ kproc_exit(0);
}
/* ----------------------------------------------------------------------- */
@@ -1126,7 +1126,7 @@ done:
wakeup(&msp->kthread);
mtx_unlock(&Giant);
- kthread_exit(0);
+ kproc_exit(0);
}
int msp_attach(bktr_ptr_t bktr)
@@ -1197,11 +1197,11 @@ int msp_attach(bktr_ptr_t bktr)
}
/* startup control thread */
- err = kthread_create(msp->simple ? msp3410d_thread : msp3400c_thread,
+ err = kproc_create(msp->simple ? msp3410d_thread : msp3400c_thread,
bktr, &msp->kthread, (RFFDG | RFPROC), 0,
msp->threaddesc);
if (err) {
- printf("%s: Error returned by kthread_create: %d", bktr_name(bktr), err);
+ printf("%s: Error returned by kproc_create: %d", bktr_name(bktr), err);
free(msp->threaddesc, M_DEVBUF);
free(msp, M_DEVBUF);
bktr->msp3400c_info = NULL;
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 91c004dff48e..15954fe4cb3b 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -3807,7 +3807,7 @@ ciss_notify_thread(void *arg)
#if __FreeBSD_version >= 500000
mtx_unlock(&sc->ciss_mtx);
#endif
- kthread_exit(0);
+ kproc_exit(0);
}
/************************************************************************
@@ -3818,11 +3818,11 @@ ciss_spawn_notify_thread(struct ciss_softc *sc)
{
#if __FreeBSD_version > 500005
- if (kthread_create((void(*)(void *))ciss_notify_thread, sc,
+ if (kproc_create((void(*)(void *))ciss_notify_thread, sc,
&sc->ciss_notify_thread, 0, 0, "ciss_notify%d",
device_get_unit(sc->ciss_dev)))
#else
- if (kthread_create((void(*)(void *))ciss_notify_thread, sc,
+ if (kproc_create((void(*)(void *))ciss_notify_thread, sc,
&sc->ciss_notify_thread, "ciss_notify%d",
device_get_unit(sc->ciss_dev)))
#endif
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 22e810b30c1a..50ba331602e7 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -1207,7 +1207,7 @@ fdc_thread(void *arg)
fdc->flags &= ~(FDC_KTHREAD_EXIT | FDC_KTHREAD_ALIVE);
mtx_unlock(&fdc->fdc_mtx);
- kthread_exit(0);
+ kproc_exit(0);
}
/*
@@ -1795,7 +1795,7 @@ fdc_attach(device_t dev)
fdout_wr(fdc, fdc->fdout = 0);
bioq_init(&fdc->head);
- kthread_create(fdc_thread, fdc, &fdc->fdc_thread, 0, 0,
+ kproc_create(fdc_thread, fdc, &fdc->fdc_thread, 0, 0,
"fdc%d", device_get_unit(dev));
settle = hz / 8;
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c
index c3c09abc4f46..c7767dae39be 100644
--- a/sys/dev/firewire/firewire.c
+++ b/sys/dev/firewire/firewire.c
@@ -440,7 +440,7 @@ firewire_attach(device_t dev)
(void *)firewire_watchdog, (void *)sc->fc);
/* create thread */
- kthread_create(fw_bus_probe_thread, (void *)fc, &fc->probe_thread,
+ kproc_create(fw_bus_probe_thread, (void *)fc, &fc->probe_thread,
0, 0, "fw%d_probe", unit);
/* Locate our children */
@@ -1661,7 +1661,7 @@ fw_bus_probe_thread(void *arg)
msleep((void *)fc, &fc->wait_lock, PWAIT|PCATCH, "-", 0);
}
mtx_unlock(&fc->wait_lock);
- kthread_exit(0);
+ kproc_exit(0);
}
/*
diff --git a/sys/dev/flash/at45d.c b/sys/dev/flash/at45d.c
index e9536e3a68b4..13e26bcac5ac 100644
--- a/sys/dev/flash/at45d.c
+++ b/sys/dev/flash/at45d.c
@@ -181,7 +181,7 @@ at45d_delayed_attach(void *xsc)
sc->disk->d_unit = device_get_unit(sc->dev);
disk_create(sc->disk, DISK_VERSION);
bioq_init(&sc->bio_queue);
- kthread_create(&at45d_task, sc, &sc->p, 0, 0, "task: at45d flash");
+ kproc_create(&at45d_task, sc, &sc->p, 0, 0, "task: at45d flash");
config_intrhook_disestablish(&sc->config_intrhook);
}
diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c
index aa67e947ea59..33c3066505aa 100644
--- a/sys/dev/hptmv/entry.c
+++ b/sys/dev/hptmv/entry.c
@@ -2396,7 +2396,7 @@ static void hpt_worker_thread(void)
#endif
*/
#if (__FreeBSD_version >= 500043)
- kthread_suspend_check(curproc);
+ kproc_suspend_check(curproc);
#else
kproc_suspend_loop(curproc);
#endif
diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c
index 5af555c46df8..7be4776fcac7 100644
--- a/sys/dev/hwpmc/hwpmc_logging.c
+++ b/sys/dev/hwpmc/hwpmc_logging.c
@@ -362,7 +362,7 @@ pmclog_loop(void *arg)
crfree(ownercred);
- kthread_exit(0);
+ kproc_exit(0);
}
/*
@@ -566,7 +566,7 @@ pmclog_configure_log(struct pmc_owner *po, int logfd)
/* mark process as owning a log file */
po->po_flags |= PMC_PO_OWNS_LOGFILE;
- error = kthread_create(pmclog_loop, po, &po->po_kthread,
+ error = kproc_create(pmclog_loop, po, &po->po_kthread,
RFHIGHPID, 0, "hwpmc: proc(%d)", p->p_pid);
if (error)
goto error;
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c
index 0ab0c426fe33..0977806da9b7 100644
--- a/sys/dev/if_ndis/if_ndis.c
+++ b/sys/dev/if_ndis/if_ndis.c
@@ -741,7 +741,7 @@ ndis_attach(dev)
#else
sc->ndis_tq = taskqueue_create("ndis_taskq", M_NOWAIT | M_ZERO,
taskqueue_thread_enqueue, &sc->ndis_tq, &sc->sc_tqproc);
- kthread_create(taskqueue_thread_loop, &sc->ndis_tq, &sc->sc_tqproc,
+ kproc_create(taskqueue_thread_loop, &sc->ndis_tq, &sc->sc_tqproc,
0, 0, "%s taskq", device_get_nameunit(dev));
#endif
TASK_INIT(&sc->ndis_scantask, 0, ndis_scan, sc);
diff --git a/sys/dev/ipmi/ipmi_kcs.c b/sys/dev/ipmi/ipmi_kcs.c
index 8ad606e9b5ae..4eda654548b9 100644
--- a/sys/dev/ipmi/ipmi_kcs.c
+++ b/sys/dev/ipmi/ipmi_kcs.c
@@ -466,14 +466,14 @@ kcs_loop(void *arg)
ipmi_complete_request(sc, req);
}
IPMI_UNLOCK(sc);
- kthread_exit(0);
+ kproc_exit(0);
}
static int
kcs_startup(struct ipmi_softc *sc)
{
- return (kthread_create(kcs_loop, sc, &sc->ipmi_kthread, 0, 0, "%s: kcs",
+ return (kproc_create(kcs_loop, sc, &sc->ipmi_kthread, 0, 0, "%s: kcs",
device_get_nameunit(sc->ipmi_dev)));
}
diff --git a/sys/dev/ipmi/ipmi_smic.c b/sys/dev/ipmi/ipmi_smic.c
index c1c69b3923cd..f9fe62e9d1f7 100644
--- a/sys/dev/ipmi/ipmi_smic.c
+++ b/sys/dev/ipmi/ipmi_smic.c
@@ -372,14 +372,14 @@ smic_loop(void *arg)
ipmi_complete_request(sc, req);
}
IPMI_UNLOCK(sc);
- kthread_exit(0);
+ kproc_exit(0);
}
static int
smic_startup(struct ipmi_softc *sc)
{
- return (kthread_create(smic_loop, sc, &sc->ipmi_kthread, 0, 0,
+ return (kproc_create(smic_loop, sc, &sc->ipmi_kthread, 0, 0,
"%s: smic", device_get_nameunit(sc->ipmi_dev)));
}
diff --git a/sys/dev/ipmi/ipmi_ssif.c b/sys/dev/ipmi/ipmi_ssif.c
index 78ad64394d39..2256de16e7ef 100644
--- a/sys/dev/ipmi/ipmi_ssif.c
+++ b/sys/dev/ipmi/ipmi_ssif.c
@@ -348,14 +348,14 @@ ssif_loop(void *arg)
IPMI_LOCK(sc);
}
IPMI_UNLOCK(sc);
- kthread_exit(0);
+ kproc_exit(0);
}
static int
ssif_startup(struct ipmi_softc *sc)
{
- return (kthread_create(ssif_loop, sc, &sc->ipmi_kthread, 0, 0,
+ return (kproc_create(ssif_loop, sc, &sc->ipmi_kthread, 0, 0,
"%s: ssif", device_get_nameunit(sc->ipmi_dev)));
}
diff --git a/sys/dev/iscsi/initiator/isc_sm.c b/sys/dev/iscsi/initiator/isc_sm.c
index c767477fe639..f024aef64917 100644
--- a/sys/dev/iscsi/initiator/isc_sm.c
+++ b/sys/dev/iscsi/initiator/isc_sm.c
@@ -587,7 +587,7 @@ ism_proc(void *vp)
sdebug(3, "terminated");
wakeup(sp);
- kthread_exit(0);
+ kproc_exit(0);
}
#if 0
@@ -782,5 +782,5 @@ ism_start(isc_session_t *sp)
sp->flags |= ISC_SM_RUN;
- return kthread_create(ism_proc, sp, &sp->stp, 0, 0, "ism_%d", sp->sid);
+ return kproc_create(ism_proc, sp, &sp->stp, 0, 0, "ism_%d", sp->sid);
}
diff --git a/sys/dev/iscsi/initiator/isc_soc.c b/sys/dev/iscsi/initiator/isc_soc.c
index 49d530df89be..f5a83444f1c5 100644
--- a/sys/dev/iscsi/initiator/isc_soc.c
+++ b/sys/dev/iscsi/initiator/isc_soc.c
@@ -539,7 +539,7 @@ isc_soc(void *vp)
mtx_unlock(&sp->io_mtx);
- kthread_exit(0);
+ kproc_exit(0);
}
void
@@ -572,5 +572,5 @@ isc_start_receiver(isc_session_t *sp)
debug_called(8);
sp->flags |= ISC_CON_RUN;
- kthread_create(isc_soc, sp, &sp->soc_proc, 0, 0, "iscsi%d", sp->sid);
+ kproc_create(isc_soc, sp, &sp->soc_proc, 0, 0, "iscsi%d", sp->sid);
}
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 4ff2f5f34352..cc7017a08c2f 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -251,11 +251,11 @@ isp_attach(ispsoftc_t *isp)
isp_callout_init(&isp->isp_osinfo.gdt);
ISP_UNLOCK(isp);
#if __FreeBSD_version >= 500000
- if (kthread_create(isp_kthread, isp, &isp->isp_osinfo.kproc,
+ if (kproc_create(isp_kthread, isp, &isp->isp_osinfo.kproc,
RFHIGHPID, 0, "%s: fc_thrd",
device_get_nameunit(isp->isp_dev)))
#else
- if (kthread_create(isp_kthread, isp, &isp->isp_osinfo.kproc,
+ if (kproc_create(isp_kthread, isp, &isp->isp_osinfo.kproc,
"%s: fc_thrd", device_get_nameunit(isp->isp_dev)))
#endif
{
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c
index aaf7d1b5bba9..f4572d3b5540 100644
--- a/sys/dev/iwi/if_iwi.c
+++ b/sys/dev/iwi/if_iwi.c
@@ -279,11 +279,11 @@ iwi_attach(device_t dev)
#else
sc->sc_tq = taskqueue_create("iwi_taskq", M_NOWAIT | M_ZERO,
taskqueue_thread_enqueue, &sc->sc_tq, &sc->sc_tqproc);
- kthread_create(taskqueue_thread_loop, &sc->sc_tq, &sc->sc_tqproc,
+ kproc_create(taskqueue_thread_loop, &sc->sc_tq, &sc->sc_tqproc,
0, 0, "%s taskq", device_get_nameunit(dev));
sc->sc_tq2 = taskqueue_create("iwi_taskq2", M_NOWAIT | M_ZERO,
taskqueue_thread_enqueue, &sc->sc_tq2, &sc->sc_tqproc);
- kthread_create(taskqueue_thread_loop, &sc->sc_tq2, &sc->sc_tqproc,
+ kproc_create(taskqueue_thread_loop, &sc->sc_tq2, &sc->sc_tqproc,
0, 0, "%s taskq2", device_get_nameunit(dev));
#endif
TASK_INIT(&sc->sc_radiontask, 0, iwi_radio_on, sc);
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 48cd0595bd16..2d63fed9394a 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -701,7 +701,7 @@ md_kthread(void *arg)
if (sc->flags & MD_SHUTDOWN) {
sc->flags |= MD_EXITING;
mtx_unlock(&sc->queue_mtx);
- kthread_exit(0);
+ kproc_exit(0);
}
bp = bioq_takefirst(&sc->bio_queue);
if (!bp) {
@@ -765,7 +765,7 @@ mdnew(int unit, int *errp, enum md_types type)
sc->unit = unit;
sprintf(sc->name, "md%d", unit);
LIST_INSERT_HEAD(&md_softc_list, sc, list);
- error = kthread_create(md_kthread, sc, &sc->procp, 0, 0,"%s", sc->name);
+ error = kproc_create(md_kthread, sc, &sc->procp, 0, 0,"%s", sc->name);
if (error == 0)
return (sc);
LIST_REMOVE(sc, list);
diff --git a/sys/dev/mmc/mmcsd.c b/sys/dev/mmc/mmcsd.c
index a9bf17f34e67..5c498fa19793 100644
--- a/sys/dev/mmc/mmcsd.c
+++ b/sys/dev/mmc/mmcsd.c
@@ -134,7 +134,7 @@ mmcsd_attach(device_t dev)
bioq_init(&sc->bio_queue);
sc->running = 1;
- kthread_create(&mmcsd_task, sc, &sc->p, 0, 0, "task: mmc/sd card");
+ kproc_create(&mmcsd_task, sc, &sc->p, 0, 0, "task: mmc/sd card");
return (0);
}
@@ -284,7 +284,7 @@ mmcsd_task(void *arg)
wakeup(sc);
MMCSD_UNLOCK(sc);
- kthread_exit(0);
+ kproc_exit(0);
}
static device_method_t mmcsd_methods[] = {
diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h
index c8fb76c4cd6d..a3676141278b 100644
--- a/sys/dev/mpt/mpt.h
+++ b/sys/dev/mpt/mpt.h
@@ -273,10 +273,10 @@ void mpt_map_rquest(void *, bus_dma_segment_t *, int, int);
/**************************** Kernel Thread Support ***************************/
#if __FreeBSD_version > 500005
#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \
- kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg)
+ kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg)
#else
#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \
- kthread_create(func, farg, proc_ptr, fmtstr, arg)
+ kproc_create(func, farg, proc_ptr, fmtstr, arg)
#endif
/****************************** Timer Facilities ******************************/
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c
index 7a67fbc34ea4..1e72afbd6ade 100644
--- a/sys/dev/mpt/mpt_cam.c
+++ b/sys/dev/mpt/mpt_cam.c
@@ -3988,7 +3988,7 @@ mpt_recovery_thread(void *arg)
mpt->recovery_thread = NULL;
wakeup(&mpt->recovery_thread);
MPT_UNLOCK(mpt);
- kthread_exit(0);
+ kproc_exit(0);
}
static int
diff --git a/sys/dev/mpt/mpt_raid.c b/sys/dev/mpt/mpt_raid.c
index 192c9d411595..ab8512261ecd 100644
--- a/sys/dev/mpt/mpt_raid.c
+++ b/sys/dev/mpt/mpt_raid.c
@@ -722,7 +722,7 @@ mpt_raid_thread(void *arg)
mpt->raid_thread = NULL;
wakeup(&mpt->raid_thread);
MPT_UNLOCK(mpt);
- kthread_exit(0);
+ kproc_exit(0);
}
#if 0
diff --git a/sys/dev/ofw/ofw_disk.c b/sys/dev/ofw/ofw_disk.c
index 130c869fe46d..d20cbc3211a6 100644
--- a/sys/dev/ofw/ofw_disk.c
+++ b/sys/dev/ofw/ofw_disk.c
@@ -169,7 +169,7 @@ g_ofwd_init(struct g_class *mp __unused)
sc->ofwd_sectorsize = OFWD_BLOCKSIZE;
sc->ofwd_fwsectors = 0;
sc->ofwd_fwheads = 0;
- error = kthread_create(ofwd_kthread, sc, &sc->ofwd_procp, 0, 0,
+ error = kproc_create(ofwd_kthread, sc, &sc->ofwd_procp, 0, 0,
"ofwd0");
if (error != 0) {
free(sc, M_DEVBUF);
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 7b8fb62f4174..1af74a0a6c80 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -332,11 +332,11 @@ cbb_detach(device_t brdev)
cbb_set(sc, CBB_SOCKET_EVENT, 0xffffffff);
/*
- * Wait for the thread to die. kthread_exit will do a wakeup
+ * Wait for the thread to die. kproc_exit will do a wakeup
* on the event thread's struct thread * so that we know it is
* safe to proceed. IF the thread is running, set the please
* die flag and wait for it to comply. Since the wakeup on
- * the event thread happens only in kthread_exit, we don't
+ * the event thread happens only in kproc_exit, we don't
* need to loop here.
*/
bus_teardown_intr(brdev, sc->irq_res, sc->intrhand);
@@ -529,7 +529,7 @@ cbb_event_thread(void *arg)
DEVPRINTF((sc->dev, "Thread terminating\n"));
sc->flags &= ~CBB_KTHREAD_RUNNING;
mtx_unlock(&sc->mtx);
- kthread_exit(0);
+ kproc_exit(0);
}
/************************************************************************/
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index 73a52b0d82cd..149bfacf1795 100644
--- a/sys/dev/pccbb/pccbb_pci.c
+++ b/sys/dev/pccbb/pccbb_pci.c
@@ -434,7 +434,7 @@ cbb_pci_attach(device_t brdev)
cbb_print_config(brdev);
/* Start the thread */
- if (kthread_create(cbb_event_thread, sc, &sc->event_thread, 0, 0,
+ if (kproc_create(cbb_event_thread, sc, &sc->event_thread, 0, 0,
"%s event thread", device_get_nameunit(brdev))) {
device_printf(brdev, "unable to create event thread.\n");
panic("cbb_create_event_thread");
diff --git a/sys/dev/random/harvest.c b/sys/dev/random/harvest.c
index d78306524ff9..aacba329437a 100644
--- a/sys/dev/random/harvest.c
+++ b/sys/dev/random/harvest.c
@@ -120,7 +120,7 @@ read_random_phony(void *buf, int count)
return (count);
}
-/* Helper routine to enable kthread_exit() to work while the module is
+/* Helper routine to enable kproc_exit() to work while the module is
* being (or has been) unloaded.
* This routine is in this file because it is always linked into the kernel,
* and will thus never be unloaded. This is critical for unloadable modules
@@ -130,6 +130,6 @@ void
random_set_wakeup_exit(void *control)
{
wakeup(control);
- kthread_exit(0);
+ kproc_exit(0);
/* NOTREACHED */
}
diff --git a/sys/dev/random/randomdev_soft.c b/sys/dev/random/randomdev_soft.c
index 365f3eacc4fe..c03673a59081 100644
--- a/sys/dev/random/randomdev_soft.c
+++ b/sys/dev/random/randomdev_soft.c
@@ -181,7 +181,7 @@ random_yarrow_init(void)
mtx_init(&harvest_mtx, "entropy harvest mutex", NULL, MTX_SPIN);
/* Start the hash/reseed thread */
- error = kthread_create(random_kthread, NULL,
+ error = kproc_create(random_kthread, NULL,
&random_kthread_proc, RFHIGHPID, 0, "yarrow");
if (error != 0)
panic("Cannot create entropy maintenance thread.");
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index d9bf387a4c8d..f30c5b1b3801 100644
--- a/sys/dev/sound/midi/sequencer.c
+++ b/sys/dev/sound/midi/sequencer.c
@@ -461,7 +461,7 @@ done:
mtx_unlock(&scp->seq_lock);
mtx_lock(&Giant);
SEQ_DEBUG(2, printf("seq_eventthread finished\n"));
- kthread_exit(0);
+ kproc_exit(0);
}
/*
@@ -576,7 +576,7 @@ seq_addunit(void)
* TODO: Add to list of sequencers this module provides
*/
- ret = kthread_create(seq_eventthread, scp, NULL, RFHIGHPID, 0,
+ ret = kproc_create(seq_eventthread, scp, NULL, RFHIGHPID, 0,
"sequencer %02d", scp->unit);
if (ret)
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 6c2da4a5fd85..6f92c77c77ec 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -338,7 +338,7 @@ usb_create_event_thread(void *arg)
struct usb_taskq *taskq;
int i;
- if (kthread_create(usb_event_thread, sc, &sc->sc_event_thread,
+ if (kproc_create(usb_event_thread, sc, &sc->sc_event_thread,
RFHIGHPID, 0, device_get_nameunit(sc->sc_dev))) {
printf("%s: unable to create event thread for\n",
device_get_nameunit(sc->sc_dev));
@@ -351,7 +351,7 @@ usb_create_event_thread(void *arg)
taskq->taskcreated = 1;
taskq->name = taskq_names[i];
TAILQ_INIT(&taskq->tasks);
- if (kthread_create(usb_task_thread, taskq,
+ if (kproc_create(usb_task_thread, taskq,
&taskq->task_thread_proc, RFHIGHPID, 0,
taskq->name)) {
printf("unable to create task thread\n");
@@ -453,7 +453,7 @@ usb_event_thread(void *arg)
wakeup(sc);
DPRINTF(("usb_event_thread: exit\n"));
- kthread_exit(0);
+ kproc_exit(0);
}
void
@@ -490,7 +490,7 @@ usb_task_thread(void *arg)
wakeup(&taskq->taskcreated);
DPRINTF(("usb_event_thread: exit\n"));
- kthread_exit(0);
+ kproc_exit(0);
}
int
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 6a0417f67d50..fd92d7b49839 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -83,10 +83,10 @@ typedef struct thread *usb_proc_ptr;
#define uio_procp uio_td
#define usb_kthread_create1(f, s, p, a0, a1) \
- kthread_create((f), (s), (p), RFHIGHPID, 0, (a0), (a1))
+ kproc_create((f), (s), (p), RFHIGHPID, 0, (a0), (a1))
#define usb_kthread_create2(f, s, p, a0) \
- kthread_create((f), (s), (p), RFHIGHPID, 0, (a0))
-#define usb_kthread_create kthread_create
+ kproc_create((f), (s), (p), RFHIGHPID, 0, (a0))
+#define usb_kthread_create kproc_create
#define config_pending_incr()
#define config_pending_decr()
diff --git a/sys/dev/utopia/utopia.c b/sys/dev/utopia/utopia.c
index 7480efc3da6f..caac02e0e83c 100644
--- a/sys/dev/utopia/utopia.c
+++ b/sys/dev/utopia/utopia.c
@@ -623,7 +623,7 @@ utopia_daemon(void *arg __unused)
}
wakeup_one(&utopia_list);
UTP_RUNLOCK_LIST();
- kthread_exit(0);
+ kproc_exit(0);
}
/*
@@ -639,7 +639,7 @@ utopia_mod_init(module_t mod, int what, void *arg)
case MOD_LOAD:
mtx_init(&utopia_list_mtx, "utopia list mutex", NULL, MTX_DEF);
- err = kthread_create(utopia_daemon, NULL, &utopia_kproc,
+ err = kproc_create(utopia_daemon, NULL, &utopia_kproc,
RFHIGHPID, 0, "utopia");
if (err != 0) {
printf("cannot created utopia thread %d\n", err);