From 9a3a5ea513533eaeeb3746a29499fb370848b2ac Mon Sep 17 00:00:00 2001 From: bernie Date: Mon, 18 Feb 2008 15:19:00 +0000 Subject: [PATCH] Add IRQ_ENABLED() for hosted environments. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1120 38d2e660-2303-0410-9eaa-f027e97ec537 --- cfg/os.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cfg/os.h b/cfg/os.h index 2843c956..e1535dd4 100644 --- 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 -- 2.25.1