From 928e3ecad0fabf5320100a0d8fbde785757aa071 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Mon, 17 Apr 2017 18:46:35 -0700 Subject: [PATCH] qcacmn: Add provision for flush callback in scheduler message Add provision for flush callback in scheduler message such that during driver unload scheduler can invoke the flush callback and components can release the common object ref count which is taken before posting the message. Change-Id: I28490e18247239af27feef3a4b53e5080ab012fc CRs-Fixed: 2034772 --- scheduler/inc/scheduler_api.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scheduler/inc/scheduler_api.h b/scheduler/inc/scheduler_api.h index feb7d63370..d7644e4ff1 100644 --- a/scheduler/inc/scheduler_api.h +++ b/scheduler/inc/scheduler_api.h @@ -73,6 +73,11 @@ typedef enum { * @bodyval: message body val * @callback: callback to be called by scheduler thread once message is posted * and scheduler thread has started processing the message. + * @flush_callback: flush callback which will be invoked during driver unload + * such that component can release the ref count of common global objects + * like PSOC, PDEV, VDEV and PEER. A component needs to populate flush + * callback in message body pointer for those messages which have taken ref + * count for above mentioned common objects. */ struct scheduler_msg { uint16_t type; @@ -80,6 +85,7 @@ struct scheduler_msg { void *bodyptr; uint32_t bodyval; void *callback; + void *flush_callback; }; typedef QDF_STATUS (*scheduler_msg_process_fn_t) (struct scheduler_msg *msg);