From cb4bc1a2f49306879ecee08f0644300f0037d92c Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 9 Mar 2007 15:27:47 +0000 Subject: Debug instrumentation git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@47 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/include/sched.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'nuttx/include/sched.h') diff --git a/nuttx/include/sched.h b/nuttx/include/sched.h index 0cf8d58d5..12cc29046 100644 --- a/nuttx/include/sched.h +++ b/nuttx/include/sched.h @@ -254,6 +254,11 @@ struct _TCB }; typedef struct _TCB _TCB; + +/* This is the callback type used by sched_foreach() */ + +typedef void (sched_foreach_t)(FAR _TCB *tcb, FAR void *arg); + #endif /* __ASSEMBLY__ */ /************************************************************ @@ -341,6 +346,13 @@ EXTERN FAR struct streamlist *sched_getstreams(void); #endif /* CONFIG_NFILE_STREAMS */ #endif /* CONFIG_NFILE_DESCRIPTORS */ +/* sched_foreach will enumerate over each task and provide the + * TCB of each task to a user callback functions. Interrupts + * will be disabled throughout this enumeration! + */ + +EXTERN void sched_foreach(sched_foreach_t handler, FAR void *arg); + #undef EXTERN #if defined(__cplusplus) } -- cgit v1.2.3