Date: Sun, 12 Sep 2010 00:53:10 +0000 (UTC) From: Weongyo Jeong <weongyo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r212489 - user/weongyo/usb/sys/dev/usb/controller Message-ID: <201009120053.o8C0rARk060267@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: weongyo Date: Sun Sep 12 00:53:10 2010 New Revision: 212489 URL: http://svn.freebsd.org/changeset/base/212489 Log: Adds a comment why the thread count should be 1. Modified: user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Modified: user/weongyo/usb/sys/dev/usb/controller/usb_controller.c ============================================================================== --- user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Sun Sep 12 00:49:16 2010 (r212488) +++ user/weongyo/usb/sys/dev/usb/controller/usb_controller.c Sun Sep 12 00:53:10 2010 (r212489) @@ -402,6 +402,10 @@ usb_attach_sub(device_t dev, struct usb_ /* Initialise USB explore taskqueue and tasks */ bus->explore_tq = taskqueue_create("usb_explore_taskq", M_WAITOK, taskqueue_thread_enqueue, &bus->explore_tq); + /* + * NOTE: the thread count always should be 1. If more, it couldn't + * guarantee the serialization between attach, detach and explore. + */ taskqueue_start_threads(&bus->explore_tq, 1, USB_PRI_MED, "USB explore taskq"); TASK_INIT(&bus->attach_task, 0, usb_bus_attach, bus);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009120053.o8C0rARk060267>