Skip to content
Snippets Groups Projects
Commit 8dd996d4 authored by deuce's avatar deuce
Browse files

Stop using signals for kernel stuff... sure it's cool, but hijacking

SIGALRM isn't.
parent 1a0312e4
No related branches found
No related tags found
No related merge requests found
......@@ -193,6 +193,7 @@ tODResult ODKrnlInitialize(void)
sigemptyset(&(act.sa_mask));
sigaction(SIGHUP,&act,NULL);
#ifdef USE_KERNEL_SIGNAL
/* Run kernel on SIGALRM (Every .01 seconds) */
act.sa_handler=sig_run_kernel;
act.sa_flags=SA_RESTART;
......@@ -203,6 +204,7 @@ tODResult ODKrnlInitialize(void)
itv.it_value.tv_sec=0;
itv.it_value.tv_usec=10000;
setitimer(ITIMER_REAL,&itv,NULL);
#endif
/* Make stdin signal driven. */
/* act.sa_handler=sig_get_char;
......@@ -220,8 +222,12 @@ tODResult ODKrnlInitialize(void)
/* Make sure SIGHUP, SIGALRM, and SIGIO are unblocked */
sigemptyset(&block);
sigaddset(&block,SIGHUP);
#ifdef USE_KERNEL_SIGNAL
sigaddset(&block,SIGALRM);
#endif
#if 0
sigaddset(&block,SIGIO);
#endif
sigprocmask(SIG_UNBLOCK,&block,NULL);
#endif
......
......@@ -66,9 +66,13 @@ tODResult ODKrnlStartChatThread(BOOL bTriggeredInternally);
#define CALL_KERNEL_IF_NEEDED()
#else /* !OD_MULTITHREADED */
#ifdef ODPLAT_NIX
#ifdef USE_KERNEL_SIGNAL
#define CALL_KERNEL_IF_NEEDED()
#else
#define CALL_KERNEL_IF_NEEDED() od_kernel()
#endif
#else
#define CALL_KERNEL_IF_NEEDED() od_kernel()
#endif /* !ODPLAT_NIX */
#endif /* !OD_MULTITHREADED */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment