Function report |
Source Code:kernel\workqueue.c |
Create Date:2022-07-28 09:26:31 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:reate_worker - create a new workqueue worker*@pool: pool the new worker will belong to* Create and start a new worker which is attached to @pool.* CONTEXT:* Might sleep. Does GFP_KERNEL allocations.* Return:* Pointer to the newly created worker.
Proto:static struct worker *create_worker(struct worker_pool *pool)
Type:struct worker
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct worker_pool * | pool |
| 1904 | id = -1 |
| 1908 | id = ida_simple_get( & worker IDs for task name , 0, 0, GFP_KERNEL) |
| 1912 | worker = alloc_worker(I: the associated node ID ) |
| 1916 | I: worker id = id |
| 1924 | I: worker task = kthread_create_on_node(worker_thread, worker, I: the associated node ID , "kworker/%s", id_buf) |
| 1926 | If IS_ERR(I: worker task ) Then Go to fail |
| 1936 | spin_lock_irq( & he pool lock ) |
| 1937 | nr_workers++ |
| 1939 | wake_up_process(I: worker task ) |
| 1940 | spin_unlock_irq( & he pool lock ) |
| 1942 | Return worker |
| 1944 | fail : |
| 1945 | If id >= 0 Then ida_simple_remove( & worker IDs for task name , id) |
| 1948 | Return NULL |
| Name | Describe |
|---|---|
| maybe_create_worker | maybe_create_worker - create a new worker if necessary*@pool: pool to create a new worker for* Create a new worker for @pool if necessary |
| get_unbound_pool | get_unbound_pool - get a worker_pool with the specified attributes*@attrs: the attributes of the worker_pool to get* Obtain a worker_pool which has the same attributes as @attrs, bump the* reference count and return it |
| workqueue_init | workqueue_init - bring workqueue subsystem fully online* This is the latter half of two-staged workqueue subsystem initialization* and invoked as soon as kthreads can be created and scheduled |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |