/* $Id: fast_sigblock3.c,v 1.2 2013/01/09 07:31:50 kostik Exp $ */ #include #include #include #include #include #include #include #include #include #include #ifndef FAST_SIGBLOCK_PEND #define FAST_SIGBLOCK_SETPTR 1 #define FAST_SIGBLOCK_UNBLOCK 2 #define FAST_SIGBLOCK_UNSETPTR 3 #define FAST_SIGBLOCK_PEND 0x1 #define FAST_SIGBLOCK_INC 0x10 #define SYS_fast_sigblock 533 #endif static uint32_t fsigblock; static void fast_sigblock_loc(int cmd, uint32_t *ptr) { int error; error = syscall(SYS_fast_sigblock, cmd, ptr); if (error == -1) err(1, "SYS_fast_sigblock"); } int main(void) { fast_sigblock_loc(FAST_SIGBLOCK_SETPTR, &fsigblock); atomic_add_int(&fsigblock, FAST_SIGBLOCK_INC); raise(SIGINT); raise(SIGKILL); pause(); return (0); }