Add support for multiple work queues

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5081 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-09-04 00:54:09 +00:00
parent fd75e325ce
commit c2b5090825
2 changed files with 14 additions and 3 deletions

View File

@ -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

View File

@ -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);