summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authorliang yongxiang <[email protected]>2018-07-11 11:45:37 +0800
committerliang yongxiang <[email protected]>2018-07-11 14:48:32 +0800
commit7b984c2f547849191036a7b15d132ff967bb9d42 (patch)
tree3ad7ffb8ad50cada35ef9a06d2d1bd460bc0e9d0 /src/object.c
parentc5ed45237ea2edeb7f861920c85e846f5e4f2277 (diff)
[kernel] add rt_object_get_type() function who return type of object without static flag
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/object.c b/src/object.c
index e279d8b1d4..b09af9ddee 100644
--- a/src/object.c
+++ b/src/object.c
@@ -419,6 +419,22 @@ rt_bool_t rt_object_is_systemobject(rt_object_t object)
}
/**
+ * This function will return the type of object without
+ * RT_Object_Class_Static flag.
+ *
+ * @param object the specified object to be get type.
+ *
+ * @return the type of object.
+ */
+rt_uint8_t rt_object_get_type(rt_object_t object)
+{
+ /* object check */
+ RT_ASSERT(object != RT_NULL);
+
+ return object->type & ~RT_Object_Class_Static;
+}
+
+/**
* This function will find specified name object from object
* container.
*