summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-04-14 10:52:21 +0800
committerGitHub <[email protected]>2020-04-14 10:52:21 +0800
commit05cd6eaad735880f7fa05c46bd841bc6a7ba2120 (patch)
tree5e0960f23c26bd3f3c289bce57dc689559809a8c /include
parentaaecf9414b97790dc17068ed366d6c3ab612dd49 (diff)
parent310517b818ac4f0eb0655cf20bf4ba4543a911aa (diff)
Merge pull request #3511 from BernardXiong/kernel_object
Kernel object
Diffstat (limited to 'include')
-rw-r--r--include/rtservice.h14
-rw-r--r--include/rtthread.h3
2 files changed, 10 insertions, 7 deletions
diff --git a/include/rtservice.h b/include/rtservice.h
index 81d6c71f17..5bd2b1c23b 100644
--- a/include/rtservice.h
+++ b/include/rtservice.h
@@ -128,21 +128,21 @@ rt_inline unsigned int rt_list_len(const rt_list_t *l)
/**
* rt_list_for_each - iterate over a list
- * @pos: the rt_list_t * to use as a loop cursor.
- * @head: the head for your list.
+ * @pos: the rt_list_t * to use as a loop cursor.
+ * @head: the head for your list.
*/
#define rt_list_for_each(pos, head) \
for (pos = (head)->next; pos != (head); pos = pos->next)
/**
* rt_list_for_each_safe - iterate over a list safe against removal of list entry
- * @pos: the rt_list_t * to use as a loop cursor.
- * @n: another rt_list_t * to use as temporary storage
- * @head: the head for your list.
+ * @pos: the rt_list_t * to use as a loop cursor.
+ * @n: another rt_list_t * to use as temporary storage
+ * @head: the head for your list.
*/
#define rt_list_for_each_safe(pos, n, head) \
- for (pos = (head)->next, n = pos->next; pos != (head); \
- pos = n, n = pos->next)
+ for (pos = (head)->next, n = pos->next; pos != (head); \
+ pos = n, n = pos->next)
/**
* rt_list_for_each_entry - iterate over list of given type
diff --git a/include/rtthread.h b/include/rtthread.h
index 70d4f38896..a76601a3bf 100644
--- a/include/rtthread.h
+++ b/include/rtthread.h
@@ -41,6 +41,9 @@ extern "C" {
void rt_system_object_init(void);
struct rt_object_information *
rt_object_get_information(enum rt_object_class_type type);
+int rt_object_get_length(enum rt_object_class_type type);
+int rt_object_get_pointers(enum rt_object_class_type type, rt_object_t *pointers, int maxlen);
+
void rt_object_init(struct rt_object *object,
enum rt_object_class_type type,
const char *name);