wqueue: remove unused work_foreach() API

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2024-06-27 19:09:00 +08:00 committed by Xiang Xiao
parent 5e8ce0b9f0
commit 04e746967a
2 changed files with 0 additions and 68 deletions

View File

@ -406,25 +406,6 @@ int work_cancel(int qid, FAR struct work_s *work);
int work_cancel_sync(int qid, FAR struct work_s *work);
/****************************************************************************
* Name: work_foreach
*
* Description:
* Enumerate over each work thread and provide the tid of each task to a
* user callback functions.
*
* Input Parameters:
* qid - The work queue ID
* handler - The function to be called with the pid of each task
* arg - The function callback
*
* Returned Value:
* None
*
****************************************************************************/
void work_foreach(int qid, work_foreach_t handler, FAR void *arg);
/****************************************************************************
* Name: work_available
*

View File

@ -279,55 +279,6 @@ static int work_thread_create(FAR const char *name, int priority,
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: work_foreach
*
* Description:
* Enumerate over each work thread and provide the tid of each task to a
* user callback functions.
*
* Input Parameters:
* qid - The work queue ID
* handler - The function to be called with the pid of each task
* arg - The function callback
*
* Returned Value:
* None
*
****************************************************************************/
void work_foreach(int qid, work_foreach_t handler, FAR void *arg)
{
FAR struct kwork_wqueue_s *wqueue;
int nthread;
int wndx;
#ifdef CONFIG_SCHED_HPWORK
if (qid == HPWORK)
{
wqueue = (FAR struct kwork_wqueue_s *)&g_hpwork;
nthread = CONFIG_SCHED_HPNTHREADS;
}
else
#endif
#ifdef CONFIG_SCHED_LPWORK
if (qid == LPWORK)
{
wqueue = (FAR struct kwork_wqueue_s *)&g_lpwork;
nthread = CONFIG_SCHED_LPNTHREADS;
}
else
#endif
{
return;
}
for (wndx = 0; wndx < nthread; wndx++)
{
handler(wqueue->worker[wndx].pid, arg);
}
}
/****************************************************************************
* Name: work_start_highpri
*