projects
/
bertos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db978d8
)
Add IRQ_ENABLED() for hosted environments.
author
bernie
<bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 18 Feb 2008 15:19:00 +0000
(15:19 +0000)
committer
bernie
<bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 18 Feb 2008 15:19:00 +0000
(15:19 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1120
38d2e660
-2303-0410-9eaa-
f027e97ec537
cfg/os.h
patch
|
blob
|
history
diff --git
a/cfg/os.h
b/cfg/os.h
index 2843c956de51ba2119ddd8a670e350ba103249eb..e1535dd49410bc04f7d21ef7f6c60889219eff20 100644
(file)
--- a/
cfg/os.h
+++ b/
cfg/os.h
@@
-106,6
+106,14
@@
do { \
sigprocmask(SIG_SETMASK, &old_sigs, NULL); \
} while (0)
+
+ #define IRQ_ENABLED() \
+ ({ \
+ sigset_t sigs; \
+ sigprocmask(SIG_SETMASK, NULL, &sigs); \
+ sigismember(&sigs, SIGALRM) ? true : false; \
+ })
+
#else
#define OS_UNIX 0
#define OS_POSIX 0