diff options
| author | armink <[email protected]> | 2019-12-20 14:46:01 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2019-12-20 16:03:33 +0800 |
| commit | a383385a3c0a676cee4471fd3cb4f372a36e1023 (patch) | |
| tree | 594994078d07de40ba37c47d5d5c536a51bfe0fc /include | |
| parent | 840eec5594e9a85d054a3242c814146ab12ad3ee (diff) | |
Sync from master v4.0.2 .
Diffstat (limited to 'include')
| -rw-r--r-- | include/libc/libc_signal.h | 15 | ||||
| -rw-r--r-- | include/rtthread.h | 1 |
2 files changed, 6 insertions, 10 deletions
diff --git a/include/libc/libc_signal.h b/include/libc/libc_signal.h index c77f36798c..898fe13f43 100644 --- a/include/libc/libc_signal.h +++ b/include/libc/libc_signal.h @@ -63,13 +63,14 @@ typedef struct siginfo siginfo_t; #define SI_MESGQ 0x05 /* Signal generated by arrival of a message on an empty message queue. */ -#ifdef RT_USING_NEWLIB -#include <sys/signal.h> +#if !defined(RT_USING_NEWLIB) +typedef void (*_sig_func_ptr)(int); +typedef unsigned long sigset_t; #endif -#if defined(__CC_ARM) || defined(__CLANG_ARM) #include <signal.h> -typedef unsigned long sigset_t; + +#if defined(__CC_ARM) || defined(__CLANG_ARM) #define SIGHUP 1 /* #define SIGINT 2 */ @@ -105,8 +106,6 @@ typedef unsigned long sigset_t; #define SIG_BLOCK 1 /* set of signals to block */ #define SIG_UNBLOCK 2 /* set of signals to, well, unblock */ -typedef void (*_sig_func_ptr)(int); - struct sigaction { _sig_func_ptr sa_handler; @@ -124,8 +123,6 @@ int sigprocmask (int how, const sigset_t *set, sigset_t *oset); int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); #elif defined(__IAR_SYSTEMS_ICC__) -#include <signal.h> -typedef unsigned long sigset_t; #define SIGHUP 1 #define SIGINT 2 @@ -161,8 +158,6 @@ typedef unsigned long sigset_t; #define SIG_BLOCK 1 /* set of signals to block */ #define SIG_UNBLOCK 2 /* set of signals to, well, unblock */ -typedef void (*_sig_func_ptr)(int); - struct sigaction { _sig_func_ptr sa_handler; diff --git a/include/rtthread.h b/include/rtthread.h index 53550672a6..32fe011ab2 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -137,6 +137,7 @@ rt_err_t rt_thread_delete(rt_thread_t thread); rt_err_t rt_thread_yield(void); rt_err_t rt_thread_delay(rt_tick_t tick); +rt_err_t rt_thread_delay_until(rt_tick_t *tick, rt_tick_t inc_tick); rt_err_t rt_thread_mdelay(rt_int32_t ms); rt_err_t rt_thread_control(rt_thread_t thread, int cmd, void *arg); rt_err_t rt_thread_suspend(rt_thread_t thread); |
