Skip to content

Commit 04e7469

Browse files
GUIDINGLIxiaoxiang781216
authored andcommitted
wqueue: remove unused work_foreach() API
Signed-off-by: ligd <[email protected]>
1 parent 5e8ce0b commit 04e7469

File tree

2 files changed

+0
-68
lines changed

2 files changed

+0
-68
lines changed

include/nuttx/wqueue.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -406,25 +406,6 @@ int work_cancel(int qid, FAR struct work_s *work);
406406

407407
int work_cancel_sync(int qid, FAR struct work_s *work);
408408

409-
/****************************************************************************
410-
* Name: work_foreach
411-
*
412-
* Description:
413-
* Enumerate over each work thread and provide the tid of each task to a
414-
* user callback functions.
415-
*
416-
* Input Parameters:
417-
* qid - The work queue ID
418-
* handler - The function to be called with the pid of each task
419-
* arg - The function callback
420-
*
421-
* Returned Value:
422-
* None
423-
*
424-
****************************************************************************/
425-
426-
void work_foreach(int qid, work_foreach_t handler, FAR void *arg);
427-
428409
/****************************************************************************
429410
* Name: work_available
430411
*

sched/wqueue/kwork_thread.c

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -279,55 +279,6 @@ static int work_thread_create(FAR const char *name, int priority,
279279
* Public Functions
280280
****************************************************************************/
281281

282-
/****************************************************************************
283-
* Name: work_foreach
284-
*
285-
* Description:
286-
* Enumerate over each work thread and provide the tid of each task to a
287-
* user callback functions.
288-
*
289-
* Input Parameters:
290-
* qid - The work queue ID
291-
* handler - The function to be called with the pid of each task
292-
* arg - The function callback
293-
*
294-
* Returned Value:
295-
* None
296-
*
297-
****************************************************************************/
298-
299-
void work_foreach(int qid, work_foreach_t handler, FAR void *arg)
300-
{
301-
FAR struct kwork_wqueue_s *wqueue;
302-
int nthread;
303-
int wndx;
304-
305-
#ifdef CONFIG_SCHED_HPWORK
306-
if (qid == HPWORK)
307-
{
308-
wqueue = (FAR struct kwork_wqueue_s *)&g_hpwork;
309-
nthread = CONFIG_SCHED_HPNTHREADS;
310-
}
311-
else
312-
#endif
313-
#ifdef CONFIG_SCHED_LPWORK
314-
if (qid == LPWORK)
315-
{
316-
wqueue = (FAR struct kwork_wqueue_s *)&g_lpwork;
317-
nthread = CONFIG_SCHED_LPNTHREADS;
318-
}
319-
else
320-
#endif
321-
{
322-
return;
323-
}
324-
325-
for (wndx = 0; wndx < nthread; wndx++)
326-
{
327-
handler(wqueue->worker[wndx].pid, arg);
328-
}
329-
}
330-
331282
/****************************************************************************
332283
* Name: work_start_highpri
333284
*

0 commit comments

Comments
 (0)