qcacmn: split scheduler init/deinit
A commonly used and robust life-cycle pattern consists of the following 4 steps: 1) create (allocate resources) 2) start (mark resources as safe for use) 3) stop (mark resources as unsafe for use) 4) destroy (deallocate resources) This pattern effectively prevents access to uninitialized and freed resources. While the dispatcher psoc life-cycle follows this pattern, the global life-cycle is condensed into steps 1 and 4. Unsurprisingly, this led to uninitialized and freed resource access problems, especially in regards to the scheduler thread. Split the scheduler init and deinit life-cycle functions into init, enable, disable, and deinit. Create new global enable and disable dispatcher functions, and call the new scheduler APIs as appropriate. This brings the global dispatcher life-cycle in line with the existing psoc life-cycle, and prevents many scheduler related resource access issues. Change-Id: I58b65be0611f48e48354f28c221185f6f490f30c CRs-Fixed: 2153283
此提交包含在:
@@ -106,6 +106,27 @@ QDF_STATUS scheduler_init(void);
|
||||
*/
|
||||
QDF_STATUS scheduler_deinit(void);
|
||||
|
||||
/**
|
||||
* scheduler_enable() - start the scheduler module
|
||||
*
|
||||
* Ready the scheduler module to service requests, and start the scheduler's
|
||||
* message processing thread. Must only be called after scheduler_init().
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scheduler_enable(void);
|
||||
|
||||
/**
|
||||
* scheduler_disable() - stop the scheduler module
|
||||
*
|
||||
* Stop the scheduler module from servicing requests, and terminate the
|
||||
* scheduler's message processing thread. Must be called before
|
||||
* scheduler_deinit().
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS scheduler_disable(void);
|
||||
|
||||
/**
|
||||
* scheduler_register_module() - register input module/queue id
|
||||
* @qid: queue id to get registered
|
||||
|
新增問題並參考
封鎖使用者