mirror of
https://github.com/apache/nuttx.git
synced 2026-09-24 08:45:04 +08:00
Add description of work queues to the porting guide. Update comments
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -264,7 +264,10 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo)
|
||||
elf_elfsize(loadinfo);
|
||||
|
||||
/* Determine the heapsize to allocate. heapsize is ignored if there is
|
||||
* no address environment.
|
||||
* no address environment because the heap is a shared resource in that
|
||||
* case. If there is no dynamic stack then heapsize must at least as big
|
||||
* as the fixed stack size since the stack will be allocated from the heap
|
||||
* in that case.
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_ARCH_ADDRENV)
|
||||
|
||||
@@ -108,7 +108,10 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_ADDRENV
|
||||
/* Determine the heapsize to allocate */
|
||||
/* Determine the heapsize to allocate. If there is no dynamic stack then
|
||||
* heapsize must at least as big as the fixed stack size since the stack
|
||||
* will be allocated from the heap in that case.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACK_DYNAMIC
|
||||
heapsize = ARCH_HEAP_SIZE;
|
||||
|
||||
@@ -63,10 +63,6 @@
|
||||
* (which runs at the lowest of priority and may not be appropriate
|
||||
* if memory reclamation is of high priority). If CONFIG_SCHED_HPWORK
|
||||
* is enabled, then the following options can also be used:
|
||||
* CONFIG_SCHED_HPWORK - Build the high priority work queue. To preserve
|
||||
* legacy behavior, CONFIG_SCHED_HPWORK is assumed to be true in a flat
|
||||
* build (CONFIG_SCHED_KERNEL=n) but must be defined in kernel mode
|
||||
* in order to build the high priority work queue.
|
||||
* CONFIG_SCHED_HPWORKPRIORITY - The execution priority of the high-
|
||||
* priority worker thread. Default: 224
|
||||
* CONFIG_SCHED_HPWORKPERIOD - How often the worker thread checks for
|
||||
@@ -338,7 +334,7 @@ int work_usrstart(void);
|
||||
*
|
||||
* Description:
|
||||
* Queue work to be performed at a later time. All queued work will be
|
||||
* performed on the worker thread of of execution (not the caller's).
|
||||
* performed on the worker thread of execution (not the caller's).
|
||||
*
|
||||
* The work structure is allocated by caller, but completely managed by
|
||||
* the work queue logic. The caller should never modify the contents of
|
||||
@@ -412,6 +408,7 @@ int work_signal(int qid);
|
||||
* Check if the work structure is available.
|
||||
*
|
||||
* Input parameters:
|
||||
* work - The work queue structure to check.
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
|
||||
+2
-2
@@ -409,7 +409,7 @@ config LIB_USRWORKPRIORITY
|
||||
int "User mode priority worker thread priority"
|
||||
default 100
|
||||
---help---
|
||||
The execution priority of the lopwer priority worker thread. Default: 192
|
||||
The execution priority of the user-mode priority worker thread. Default: 100
|
||||
|
||||
config LIB_USRWORKPERIOD
|
||||
int "User mode worker thread period"
|
||||
@@ -425,7 +425,7 @@ config LIB_USRWORKSTACKSIZE
|
||||
The stack size allocated for the lower priority worker thread. Default: 2K.
|
||||
|
||||
endif # LIB_USRWORK
|
||||
endif # BUILD_PROTECTED
|
||||
endif # BUILD_PROTECTED || BUILD_KERNEL
|
||||
|
||||
config LIB_KBDCODEC
|
||||
bool "Keyboard CODEC"
|
||||
|
||||
+5
-5
@@ -855,7 +855,7 @@ config SCHED_HPWORKPRIORITY
|
||||
The higher priority worker thread is intended to serve as the
|
||||
"bottom" half for device drivers. As a consequence it must run at
|
||||
a very high, fixed priority. Typically, it should be the highest
|
||||
priority thread in your system. Default: 192
|
||||
priority thread in your system. Default: 224
|
||||
|
||||
For lower priority, application oriented worker thread support,
|
||||
please consider enabling the lower priority work queue. The lower
|
||||
@@ -903,14 +903,14 @@ config SCHED_LPNTHREADS
|
||||
default 4 if FS_AIO
|
||||
---help---
|
||||
This options selects multiple, low-priority threads. This is
|
||||
essentially a "thread pool" that provides multi-threaded service
|
||||
of the low-priority work thread. This breaks the serialization
|
||||
essentially a "thread pool" that provides multi-threaded servicing
|
||||
of the low-priority work queue. This breaks the serialization
|
||||
of the "queue" (hence, it is no longer a queue at all).
|
||||
|
||||
This options is required to support, for example, I/O operations
|
||||
that stall waiting for input. If there is only a single thread,
|
||||
then the entire low-priority queue processing stalls in such cases.
|
||||
Such behvior must be support for asynchronous I/O, AIO (for example).
|
||||
Such behavior is necessary to support asynchronous I/O, AIO (for example).
|
||||
|
||||
config SCHED_LPWORKPRIORITY
|
||||
int "Low priority worker thread priority"
|
||||
@@ -959,7 +959,7 @@ config SCHED_LPWORKPRIOMAX
|
||||
it must run at a very high, fixed priority. Typically, it should
|
||||
be the highest priority thread in your system.
|
||||
|
||||
This function provides an upper limit on the priority of the lower
|
||||
This value provides an upper limit on the priority of the lower
|
||||
priority worker thread. This would be necessary, for example, if
|
||||
the higher priority worker thread were to defer work to the lower
|
||||
priority thread. Clearly, in such a case, you would want to limit
|
||||
|
||||
Reference in New Issue
Block a user