(empth_start, empth_init) [_EMPTH_POSIX]: Do not handle SIGALRM. We

don't raise it, and the signal handler is fishy.
(empth_alarm): Unused, remove.
This commit is contained in:
Markus Armbruster 2005-10-26 16:30:00 +00:00
parent cae225a94a
commit e6145fa515
4 changed files with 0 additions and 45 deletions

View file

@ -205,7 +205,4 @@ void empth_sem_signal(empth_sem_t *sem);
*/
void empth_sem_wait(empth_sem_t *sem);
/* Internal function, not part of the thread abstraction */
void empth_alarm(int);
#endif

View file

@ -126,10 +126,4 @@ empth_sem_wait(empth_sem_t *sm)
lwpWait(sm);
}
void
empth_alarm(int sig)
{
/* no way we can be here while using LWP threads */
panic(sig);
}
#endif

View file

@ -569,20 +569,6 @@ empth_select(int fd, int flags)
loc_RunThisThread();
}
/************************
* empth_alarm
*/
void
empth_alarm(int sig)
{
empth_t *pThread = TlsGetValue(dwTLSIndex);
loc_debug("got alarm signal %d", sig);
/* Let it run if it is blocked like... */
SetEvent(pThread->hThreadEvent);
}
/************************
* empth_wakeup
*

View file

@ -109,9 +109,6 @@ empth_start(void *arg)
act.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &act, NULL);
act.sa_handler = empth_alarm;
sigaction(SIGALRM, &act, NULL);
ctx->id = pthread_self();
pthread_setspecific(ctx_key, ctx);
pthread_mutex_lock(&mtx_ctxsw);
@ -156,17 +153,11 @@ int
empth_init(void **ctx_ptr, int flags)
{
empth_t *ctx;
struct sigaction act;
pthread_key_create(&ctx_key, NULL);
pthread_mutex_init(&mtx_ctxsw, NULL);
act.sa_flags = 0;
sigemptyset(&act.sa_mask);
act.sa_handler = empth_alarm;
sigaction(SIGALRM, &act, NULL);
udata = ctx_ptr;
ctx = malloc(sizeof(empth_t));
if (!ctx) {
@ -362,19 +353,6 @@ empth_select(int fd, int flags)
}
void
empth_alarm(int sig)
{
struct sigaction act;
empth_status("got alarm signal");
#ifdef SA_RESTART
act.sa_flags &= ~SA_RESTART;
#endif
sigemptyset(&act.sa_mask);
act.sa_handler = empth_alarm;
sigaction(SIGALRM, &act, NULL);
}
void
empth_wakeup(empth_t *a)
{