From c2b50908258afd4035ada60db217f446f3ec9b13 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 00:54:09 +0000 Subject: [PATCH] Add support for multiple work queues git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5081 42af7a65-404d-4744-a932-0658087f49c3 --- configs/README.txt | 13 ++++++++++++- configs/pic32mx7mmb/src/up_touchscreen.c | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/configs/README.txt b/configs/README.txt index 1b405b3e45..7ad2825d0c 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -361,13 +361,24 @@ defconfig -- This is a configuration file similar to the Linux if memory reclamation is of high priority). If CONFIG_SCHED_WORKQUEUE is enabled, then the following options can also be used: CONFIG_SCHED_WORKPRIORITY - The execution priority of the worker - thread. Default: 50 + thread. Default: 192 CONFIG_SCHED_WORKPERIOD - How often the worker thread checks for work in units of microseconds. Default: 50*1000 (50 MS). CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE. CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up the worker thread. Default: 4 + CONFIG_SCHED_LPWORK. If CONFIG_SCHED_WORKQUEUE is defined, then a single + work queue is created by default. If CONFIG_SCHED_LPWORK is also defined + then an additional, lower-priority work queue will also be created. This + lower priority work queue is better suited for more extended processing + (such as file system clean-up operations) + CONFIG_SCHED_LPWORKPRIORITY - The execution priority of the lower priority + worker thread. Default: 50 + CONFIG_SCHED_LPWORKPERIOD - How often the lower priority worker thread + checks for work in units of microseconds. Default: 50*1000 (50 MS). + CONFIG_SCHED_LPWORKSTACKSIZE - The stack size allocated for the lower + priority worker thread. Default: CONFIG_IDLETHREAD_STACKSIZE. CONFIG_SCHED_WAITPID - Enables the waitpid() API CONFIG_SCHED_ATEXIT - Enables the atexit() API CONFIG_SCHED_ATEXIT_MAX - By default if CONFIG_SCHED_ATEXIT is diff --git a/configs/pic32mx7mmb/src/up_touchscreen.c b/configs/pic32mx7mmb/src/up_touchscreen.c index 33d7dcbe3f..c8fe53507a 100644 --- a/configs/pic32mx7mmb/src/up_touchscreen.c +++ b/configs/pic32mx7mmb/src/up_touchscreen.c @@ -972,7 +972,7 @@ static void tc_worker(FAR void *arg) /* Set up the next sample event */ - ret = work_queue(&priv->work, tc_worker, priv, delay); + ret = work_queue(HPWORK, &priv->work, tc_worker, priv, delay); ASSERT(ret == 0); } @@ -1420,7 +1420,7 @@ int arch_tcinitialize(int minor) */ priv->state = TC_READY; - ret = work_queue(&priv->work, tc_worker, priv, 0); + ret = work_queue(HPWORK, &priv->work, tc_worker, priv, 0); if (ret != 0) { idbg("Failed to queue work: %d\n", ret);