diff options
author | julian <julian@FreeBSD.org> | 2007-10-20 23:23:23 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2007-10-20 23:23:23 +0000 |
commit | 51d643caa6efc11780104da450ee36a818170f81 (patch) | |
tree | 705ce8283c36af96cf048c799a9c02ee91af62db /sys/geom/vinum | |
parent | 830ad96079c0199720ca93a683f2a4450afac014 (diff) | |
download | FreeBSD-src-51d643caa6efc11780104da450ee36a818170f81.zip FreeBSD-src-51d643caa6efc11780104da450ee36a818170f81.tar.gz |
Rename the kthread_xxx (e.g. kthread_create()) calls
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.
I'd LOVE to do this rename in 7.0 so that we can eventually MFC the
new kthread_xxx() calls.
Diffstat (limited to 'sys/geom/vinum')
-rw-r--r-- | sys/geom/vinum/geom_vinum_drive.c | 6 | ||||
-rw-r--r-- | sys/geom/vinum/geom_vinum_init.c | 20 | ||||
-rw-r--r-- | sys/geom/vinum/geom_vinum_plex.c | 6 | ||||
-rw-r--r-- | sys/geom/vinum/geom_vinum_volume.c | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/sys/geom/vinum/geom_vinum_drive.c b/sys/geom/vinum/geom_vinum_drive.c index 98b7c57..60583da 100644 --- a/sys/geom/vinum/geom_vinum_drive.c +++ b/sys/geom/vinum/geom_vinum_drive.c @@ -80,7 +80,7 @@ gv_config_new_drive(struct gv_drive *d) d->bqueue = g_malloc(sizeof(struct bio_queue_head), M_WAITOK | M_ZERO); bioq_init(d->bqueue); mtx_init(&d->bqueue_mtx, "gv_drive", NULL, MTX_DEF); - kthread_create(gv_drive_worker, d, NULL, 0, 0, "gv_d %s", d->name); + kproc_create(gv_drive_worker, d, NULL, 0, 0, "gv_d %s", d->name); d->flags |= GV_DRIVE_THREAD_ACTIVE; } @@ -373,7 +373,7 @@ gv_drive_worker(void *arg) mtx_unlock(&d->bqueue_mtx); d->flags |= GV_DRIVE_THREAD_DEAD; - kthread_exit(ENXIO); + kproc_exit(ENXIO); } @@ -509,7 +509,7 @@ gv_drive_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) mtx_init(&d->bqueue_mtx, "gv_drive", NULL, MTX_DEF); if (!(d->flags & GV_DRIVE_THREAD_ACTIVE)) { - kthread_create(gv_drive_worker, d, NULL, 0, 0, + kproc_create(gv_drive_worker, d, NULL, 0, 0, "gv_d %s", d->name); d->flags |= GV_DRIVE_THREAD_ACTIVE; } diff --git a/sys/geom/vinum/geom_vinum_init.c b/sys/geom/vinum/geom_vinum_init.c index b3d744e..8ff215f 100644 --- a/sys/geom/vinum/geom_vinum_init.c +++ b/sys/geom/vinum/geom_vinum_init.c @@ -348,7 +348,7 @@ gv_sync(struct gv_volume *v) sync->from = up; sync->to = p; sync->syncsize = GV_DFLT_SYNCSIZE; - kthread_create(gv_sync_td, sync, NULL, 0, 0, "gv_sync '%s'", + kproc_create(gv_sync_td, sync, NULL, 0, 0, "gv_sync '%s'", p->name); } @@ -371,7 +371,7 @@ gv_rebuild_plex(struct gv_plex *p) sync->to = p; sync->syncsize = GV_DFLT_SYNCSIZE; - kthread_create(gv_rebuild_td, sync, NULL, 0, 0, "gv_rebuild %s", + kproc_create(gv_rebuild_td, sync, NULL, 0, 0, "gv_rebuild %s", p->name); return (0); @@ -389,7 +389,7 @@ gv_init_plex(struct gv_plex *p) return (EINPROGRESS); gv_set_sd_state(s, GV_SD_INITIALIZING, GV_SETSTATE_FORCE); s->init_size = GV_DFLT_SYNCSIZE; - kthread_create(gv_init_td, s, NULL, 0, 0, "gv_init %s", + kproc_create(gv_init_td, s, NULL, 0, 0, "gv_init %s", s->name); } @@ -422,7 +422,7 @@ gv_rebuild_td(void *arg) g_topology_unlock(); printf("GEOM_VINUM: rebuild of %s failed to access consumer: " "%d\n", p->name, error); - kthread_exit(error); + kproc_exit(error); } g_topology_unlock(); @@ -480,7 +480,7 @@ gv_rebuild_td(void *arg) printf("GEOM_VINUM: rebuild of %s finished\n", p->name); g_free(sync); - kthread_exit(error); + kproc_exit(error); } void @@ -511,7 +511,7 @@ gv_sync_td(void *arg) printf("GEOM_VINUM: sync from '%s' failed to access " "consumer: %d\n", sync->from->name, error); g_free(sync); - kthread_exit(error); + kproc_exit(error); } error = g_access(to, 0, 1, 0); if (error) { @@ -520,7 +520,7 @@ gv_sync_td(void *arg) printf("GEOM_VINUM: sync to '%s' failed to access " "consumer: %d\n", p->name, error); g_free(sync); - kthread_exit(error); + kproc_exit(error); } g_topology_unlock(); @@ -593,7 +593,7 @@ gv_sync_td(void *arg) p->synced = 0; g_free(sync); - kthread_exit(error); + kproc_exit(error); } void @@ -632,7 +632,7 @@ gv_init_td(void *arg) g_topology_unlock(); printf("GEOM_VINUM: subdisk '%s' init: failed to access " "consumer; error: %d\n", s->name, error); - kthread_exit(error); + kproc_exit(error); } g_topology_unlock(); @@ -667,5 +667,5 @@ gv_init_td(void *arg) printf("GEOM_VINUM: subdisk '%s' init: finished successfully\n", s->name); } - kthread_exit(error); + kproc_exit(error); } diff --git a/sys/geom/vinum/geom_vinum_plex.c b/sys/geom/vinum/geom_vinum_plex.c index bdcce21..31a64ab 100644 --- a/sys/geom/vinum/geom_vinum_plex.c +++ b/sys/geom/vinum/geom_vinum_plex.c @@ -332,7 +332,7 @@ gv_plex_worker(void *arg) p->flags |= GV_PLEX_THREAD_DEAD; wakeup(p); - kthread_exit(ENXIO); + kproc_exit(ENXIO); } static int @@ -783,7 +783,7 @@ gv_plex_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) if (mtx_initialized(&p->bqueue_mtx) == 0) mtx_init(&p->bqueue_mtx, "gv_plex", NULL, MTX_DEF); if (!(p->flags & GV_PLEX_THREAD_ACTIVE)) { - kthread_create(gv_plex_worker, p, NULL, 0, 0, "gv_p %s", + kproc_create(gv_plex_worker, p, NULL, 0, 0, "gv_p %s", p->name); p->flags |= GV_PLEX_THREAD_ACTIVE; } @@ -807,7 +807,7 @@ gv_plex_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) M_WAITOK | M_ZERO); bioq_init(p->wqueue); mtx_init(&p->bqueue_mtx, "gv_plex", NULL, MTX_DEF); - kthread_create(gv_plex_worker, p, NULL, 0, 0, "gv_p %s", + kproc_create(gv_plex_worker, p, NULL, 0, 0, "gv_p %s", p->name); p->flags |= GV_PLEX_THREAD_ACTIVE; diff --git a/sys/geom/vinum/geom_vinum_volume.c b/sys/geom/vinum/geom_vinum_volume.c index afc1f2a..eed495b 100644 --- a/sys/geom/vinum/geom_vinum_volume.c +++ b/sys/geom/vinum/geom_vinum_volume.c @@ -149,7 +149,7 @@ gv_vol_worker(void *arg) v->flags |= GV_VOL_THREAD_DEAD; wakeup(v); - kthread_exit(ENXIO); + kproc_exit(ENXIO); } static void @@ -369,7 +369,7 @@ gv_volume_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) mtx_init(&v->bqueue_mtx, "gv_plex", NULL, MTX_DEF); if (!(v->flags & GV_VOL_THREAD_ACTIVE)) { - kthread_create(gv_vol_worker, v, NULL, 0, 0, "gv_v %s", + kproc_create(gv_vol_worker, v, NULL, 0, 0, "gv_v %s", v->name); v->flags |= GV_VOL_THREAD_ACTIVE; } |