diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-08-16 14:13:55 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-08-16 14:13:55 +0000 |
commit | 5176f40a2845db311fcc49d85903a6bd8d27fc67 (patch) | |
tree | cd2fa5bb9c9491e0eebff225d6d85ceb66113345 /sys/dev/usb/usb_process.c | |
parent | b4deaa79448cabef0b0928c695ef20fb95a034d6 (diff) | |
download | FreeBSD-src-5176f40a2845db311fcc49d85903a6bd8d27fc67.zip FreeBSD-src-5176f40a2845db311fcc49d85903a6bd8d27fc67.tar.gz |
Change the usb workers from kernel processes to threads, this is mostly a
cosmetic change to reduce cruft in the proc table.
Also change the idle wait message to `-` like how taskqueues are.
Reviewed by: julian
Approved by: re (kib)
Diffstat (limited to 'sys/dev/usb/usb_process.c')
-rw-r--r-- | sys/dev/usb/usb_process.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/usb/usb_process.c b/sys/dev/usb/usb_process.c index eb79f16..5b98a81 100644 --- a/sys/dev/usb/usb_process.c +++ b/sys/dev/usb/usb_process.c @@ -63,10 +63,12 @@ #endif #if (__FreeBSD_version >= 800000) +static struct proc *usbproc; #define USB_THREAD_CREATE(f, s, p, ...) \ - kproc_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) -#define USB_THREAD_SUSPEND(p) kproc_suspend(p,0) -#define USB_THREAD_EXIT(err) kproc_exit(err) + kproc_kthread_add((f), (s), &usbproc, (p), RFHIGHPID, \ + 0, "usb", __VA_ARGS__) +#define USB_THREAD_SUSPEND(p) kthread_suspend(p,0) +#define USB_THREAD_EXIT(err) kthread_exit() #else #define USB_THREAD_CREATE(f, s, p, ...) \ kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) @@ -207,8 +209,8 @@ usb_proc_create(struct usb_process *up, struct mtx *p_mtx, TAILQ_INIT(&up->up_qhead); - cv_init(&up->up_cv, "wmsg"); - cv_init(&up->up_drain, "dmsg"); + cv_init(&up->up_cv, "-"); + cv_init(&up->up_drain, "usbdrain"); if (USB_THREAD_CREATE(&usb_process, up, &up->up_ptr, pmesg)) { |