summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-11-20 23:13:45 +0800
committerGitHub <[email protected]>2018-11-20 23:13:45 +0800
commit46dae3f35f5cc44664a26ebd87803156033a166a (patch)
tree47f132d0a7472768deabd2add67d990c0c6e64e7 /include
parentb31888de49408b212d2aeab4b40b2a672b958313 (diff)
parent6b6d122e3673ca64d2171d3daf1ae940edfa699a (diff)
Merge branch 'master' into dev-4.0.x
Diffstat (limited to 'include')
-rw-r--r--include/libc/libc_signal.h18
-rw-r--r--include/rtdbg.h14
-rw-r--r--include/rtthread.h3
3 files changed, 21 insertions, 14 deletions
diff --git a/include/libc/libc_signal.h b/include/libc/libc_signal.h
index b592b8227e..61a7e445e9 100644
--- a/include/libc/libc_signal.h
+++ b/include/libc/libc_signal.h
@@ -76,20 +76,20 @@ typedef struct siginfo siginfo_t;
typedef unsigned long sigset_t;
#define SIGHUP 1
-// #define SIGINT 2
+/* #define SIGINT 2 */
#define SIGQUIT 3
-// #define SIGILL 4
+/* #define SIGILL 4 */
#define SIGTRAP 5
-// #define SIGABRT 6
+/* #define SIGABRT 6 */
#define SIGEMT 7
-// #define SIGFPE 8
+/* #define SIGFPE 8 */
#define SIGKILL 9
#define SIGBUS 10
-// #define SIGSEGV 11
+/* #define SIGSEGV 11 */
#define SIGSYS 12
#define SIGPIPE 13
#define SIGALRM 14
-// #define SIGTERM 15
+/* #define SIGTERM 15 */
#define SIGURG 16
#define SIGSTOP 17
#define SIGTSTP 18
@@ -99,8 +99,8 @@ typedef unsigned long sigset_t;
#define SIGTTOU 22
#define SIGPOLL 23
#define SIGWINCH 24
-// #define SIGUSR1 25
-// #define SIGUSR2 26
+/* #define SIGUSR1 25 */
+/* #define SIGUSR2 26 */
#define SIGRTMIN 27
#define SIGRTMAX 31
#define NSIG 32
@@ -136,7 +136,7 @@ typedef unsigned long sigset_t;
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
-// #define SIGABRT 6
+/* #define SIGABRT 6 */
#define SIGEMT 7
#define SIGFPE 8
#define SIGKILL 9
diff --git a/include/rtdbg.h b/include/rtdbg.h
index d19a191227..9036a0cd66 100644
--- a/include/rtdbg.h
+++ b/include/rtdbg.h
@@ -23,10 +23,7 @@
* #define DBG_LEVEL DBG_INFO
* #include <rtdbg.h> // must after of DEBUG_ENABLE or some other options
*
- * Then in your C/C++ file, you can use dbg_log macro to print out logs:
- * dbg_log(DBG_INFO, "this is a log!\n");
- *
- * Or if you want to using the simple API, you can
+ * Then in your C/C++ file, you can use LOG_X macro to print out logs:
* LOG_D("this is a debug log!");
* LOG_E("this is a error log!");
*
@@ -39,6 +36,11 @@
#include <rtconfig.h>
+#if defined(RT_USING_ULOG) && defined(DBG_ENABLE)
+/* using ulog compatible with rtdbg */
+#include <ulog.h>
+#else
+
/* DEBUG level */
#define DBG_ERROR 0
#define DBG_WARNING 1
@@ -82,6 +84,8 @@
/*
* static debug routine
+ * NOTE: This is a NOT RECOMMENDED API. Please using LOG_X API.
+ * It will be DISCARDED later. Because it will take up more resources.
*/
#define dbg_log(level, fmt, ...) \
if ((level) <= DBG_LEVEL) \
@@ -167,4 +171,6 @@
#define LOG_RAW(...) dbg_raw(__VA_ARGS__)
+#endif /* defined(RT_USING_ULOG) && define(DBG_ENABLE) */
+
#endif /* RT_DBG_H__ */
diff --git a/include/rtthread.h b/include/rtthread.h
index 814fa454d8..3fc77d343c 100644
--- a/include/rtthread.h
+++ b/include/rtthread.h
@@ -100,7 +100,8 @@ rt_tick_t rt_timer_next_timeout_tick(void);
void rt_timer_check(void);
#ifdef RT_USING_HOOK
-void rt_timer_timeout_sethook(void (*hook)(struct rt_timer *timer));
+void rt_timer_enter_sethook(void (*hook)(struct rt_timer *timer));
+void rt_timer_exit_sethook(void (*hook)(struct rt_timer *timer));
#endif
/**@}*/