summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWayne Lin <[email protected]>2022-01-25 18:53:52 +0800
committerWayne Lin <[email protected]>2022-01-25 18:53:52 +0800
commitc95c296e9915a38a666ae1a2575c2a4d0ba1d376 (patch)
treec6e5a1ffe4ceb997e853ba0c3daffc9dc60c8b79 /include
parentf7ba146a01fcf23a2b06a141d1b1a56cb27b878c (diff)
parent32a5668593c578b85560338c29d76f3a252c8dbc (diff)
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into nuvoton
# Conflicts: # bsp/gd32/gd32107c-eval/rtconfig.h
Diffstat (limited to 'include')
-rw-r--r--include/rtdef.h56
1 files changed, 5 insertions, 51 deletions
diff --git a/include/rtdef.h b/include/rtdef.h
index 6d47d18a2c..66d30001a0 100644
--- a/include/rtdef.h
+++ b/include/rtdef.h
@@ -39,6 +39,8 @@
* 2021-11-19 Meco Man change version number to v4.1.0
* 2021-12-21 Meco Man re-implement RT_UNUSED
* 2022-01-01 Gabriel improve hooking method
+ * 2022-01-07 Gabriel move some __on_rt_xxxxx_hook to dedicated c soure files
+ * 2022-01-12 Meco Man remove RT_THREAD_BLOCK
*/
#ifndef __RT_DEF_H__
@@ -450,12 +452,6 @@ struct rt_object_information
#endif
#endif
-#ifndef __on_rt_interrupt_enter_hook
- #define __on_rt_interrupt_enter_hook() __ON_HOOK_ARGS(rt_interrupt_enter_hook, ())
-#endif
-#ifndef __on_rt_interrupt_leave_hook
- #define __on_rt_interrupt_leave_hook() __ON_HOOK_ARGS(rt_interrupt_leave_hook, ())
-#endif
#ifndef __on_rt_interrupt_switch_hook
#define __on_rt_interrupt_switch_hook() __ON_HOOK_ARGS(rt_interrupt_switch_hook, ())
#endif
@@ -465,48 +461,7 @@ struct rt_object_information
#ifndef __on_rt_free_hook
#define __on_rt_free_hook(rmem) __ON_HOOK_ARGS(rt_free_hook, (rmem))
#endif
-#ifndef __on_rt_mp_alloc_hook
- #define __on_rt_mp_alloc_hook(mp, block) __ON_HOOK_ARGS(rt_mp_alloc_hook, (mp, block))
-#endif
-#ifndef __on_rt_mp_free_hook
- #define __on_rt_mp_free_hook(mp, block) __ON_HOOK_ARGS(rt_mp_free_hook, (mp, block))
-#endif
-#ifndef __on_rt_object_trytake_hook
- #define __on_rt_object_trytake_hook(parent) __ON_HOOK_ARGS(rt_object_trytake_hook, (parent))
-#endif
-#ifndef __on_rt_object_take_hook
- #define __on_rt_object_take_hook(parent) __ON_HOOK_ARGS(rt_object_take_hook, (parent))
-#endif
-#ifndef __on_rt_object_put_hook
- #define __on_rt_object_put_hook(parent) __ON_HOOK_ARGS(rt_object_put_hook, (parent))
-#endif
-#ifndef __on_rt_scheduler_hook
- #define __on_rt_scheduler_hook(from, to) __ON_HOOK_ARGS(rt_scheduler_hook, (from, to))
-#endif
-#ifndef __on_rt_scheduler_switch_hook
- #define __on_rt_scheduler_switch_hook(tid) __ON_HOOK_ARGS(rt_scheduler_switch_hook, (tid))
-#endif
-#ifndef __on_rt_object_attach_hook
- #define __on_rt_object_attach_hook(obj) __ON_HOOK_ARGS(rt_object_attach_hook, (obj))
-#endif
-#ifndef __on_rt_object_detach_hook
- #define __on_rt_object_detach_hook(obj) __ON_HOOK_ARGS(rt_object_detach_hook, (obj))
-#endif
-#ifndef __on_rt_thread_inited_hook
- #define __on_rt_thread_inited_hook(thread) __ON_HOOK_ARGS(rt_thread_inited_hook, (thread))
-#endif
-#ifndef __on_rt_thread_suspend_hook
- #define __on_rt_thread_suspend_hook(thread) __ON_HOOK_ARGS(rt_thread_suspend_hook, (thread))
-#endif
-#ifndef __on_rt_thread_resume_hook
- #define __on_rt_thread_resume_hook(thread) __ON_HOOK_ARGS(rt_thread_resume_hook, (thread))
-#endif
-#ifndef __on_rt_timer_enter_hook
- #define __on_rt_timer_enter_hook(t) __ON_HOOK_ARGS(rt_timer_enter_hook, (t))
-#endif
-#ifndef __on_rt_timer_exit_hook
- #define __on_rt_timer_exit_hook(t) __ON_HOOK_ARGS(rt_timer_exit_hook, (t))
-#endif
+
/**@}*/
@@ -532,6 +487,7 @@ struct rt_object_information
#define RT_TIMER_CTRL_SET_ONESHOT 0x2 /**< change timer to one shot */
#define RT_TIMER_CTRL_SET_PERIODIC 0x3 /**< change timer to periodic */
#define RT_TIMER_CTRL_GET_STATE 0x4 /**< get timer run state active or deactive*/
+#define RT_TIMER_CTRL_GET_REMAIN_TIME 0x5 /**< get the remaining hang time */
#ifndef RT_TIMER_SKIP_LIST_LEVEL
#define RT_TIMER_SKIP_LIST_LEVEL 1
@@ -591,7 +547,6 @@ typedef siginfo_t rt_siginfo_t;
#define RT_THREAD_READY 0x01 /**< Ready status */
#define RT_THREAD_SUSPEND 0x02 /**< Suspend status */
#define RT_THREAD_RUNNING 0x03 /**< Running status */
-#define RT_THREAD_BLOCK RT_THREAD_SUSPEND /**< Blocked status */
#define RT_THREAD_CLOSE 0x04 /**< Closed status */
#define RT_THREAD_STAT_MASK 0x07
@@ -682,7 +637,7 @@ struct rt_thread
#ifdef RT_USING_SMP
rt_uint8_t bind_cpu; /**< thread is bind to cpu */
- rt_uint8_t oncpu; /**< process on cpu` */
+ rt_uint8_t oncpu; /**< process on cpu */
rt_uint16_t scheduler_lock_nest; /**< scheduler lock count */
rt_uint16_t cpus_lock_nest; /**< cpus lock count */
@@ -691,7 +646,6 @@ struct rt_thread
/* priority */
rt_uint8_t current_priority; /**< current priority */
- rt_uint8_t init_priority; /**< initialized priority */
#if RT_THREAD_PRIORITY_MAX > 32
rt_uint8_t number;
rt_uint8_t high_mask;