![]() The work item also maintains information about its status.Ī work item must be initialized before it can be used. ![]() Thisįunction accepts a single argument, which is the address of the work item Each work item is referencedĪ work item is assigned a handler function, which is the functionĮxecuted by the workqueue’s thread when the work item is processed. See also WorkqueueĪny number of work items can be defined. Of the type observed with the previous implementation. K_work_is_pending(), or measurements of remaining time untilĭelayable work is scheduled, should be avoided to prevent race conditions Using the return values of k_work_busy_get() or Safe handling of work item resubmission when the item is being processed Specifically allowing a previous deadline to remain unchanged when a work The ability to wait until a work item has completed or a queue has beenįiner control of behavior when scheduling a delayable work item, K_NO_WAIT rather than always going through the timeout API, Checking of return values on cancellation is stillĭirect submission of delayable work items to the queue with Precise tracking of the status of cancelled work items, so that theĬaller need not be concerned that an item may be processing when theĬancellation returns. Implementation used prior to release 2.6. The behavior described here is changed from the Zephyr workqueue This sets its queue toĮmpty and spawns the workqueue’s thread. Regardless of workqueue thread priority the workqueue thread will yieldīetween each submitted work item, to prevent a cooperative workqueue fromĪ workqueue must be initialized before it can be used. Thread is configurable, allowing it to be either cooperative or preemptive Workqueue is referenced by its memory address.Ī workqueue has the following key properties:Ī queue of work items that have been added, but not yet processed.Ī thread that processes the work items in the queue. To a lower-priority thread so it does not impact time-sensitive processing.Īny number of workqueues can be defined (limited only by available RAM). Used by an ISR or a high-priority thread to offload non-urgent processing Each work item is processed byĬalling the function specified by the work item. Work items in a first in, first out manner. A workqueue is a kernel object that uses a dedicated thread to process
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |