summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/sched.h12
-rw-r--r--nuttx/include/stdio.h1
2 files changed, 13 insertions, 0 deletions
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)
}
diff --git a/nuttx/include/stdio.h b/nuttx/include/stdio.h
index 8b9a7e28e..f234a861c 100644
--- a/nuttx/include/stdio.h
+++ b/nuttx/include/stdio.h
@@ -131,6 +131,7 @@ struct _dirent
{
FAR char *d_name; /* name of directory entry */
};
+
struct dirent
{
FAR char *d_name; /* A pointer to d_szname */