This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: sigwait not returning
"N.Suresh" <nsuresh@cdotb.ernet.in> writes:
> Hi,
> We tried delivering the signal to a sigwait () call:
> *) Using alarm () function --- Working.
> *) pthread_kill () function --- Working.
>
> It looks like only in the case of timer_create () case, the
> sigwait is not returning.
>
> We traced the call and found that in the following piece of code,
> signal_sigwait condition variable's queue is empty.
> So it is not calling the broadcast method which will wake the
> sigwait thread.
> It is releasing the thread, and in next POSIX_ASR call, the
> cyg_deliver_signals function is calling _exit because there
> is no signal handler registered for this thread.
> All these functions are getting called only if i unmask the
> signal in the thread before calling the sigwait.
> Otherwise the check in the alarm_action function whether thread
> is accepting this signal will fail.
> Are we on the right path of debugging?
>
Sort of. I've been looking at this myself. The problem is that the
timer alarm_action() routine should broadcast the signal_sigwait
condition variable the same way that sigalrm_action() does.
I have this fixed locally. However, We've been having power cuts here
and I haven't had time to check it in to the repository. I'll try to
do that later today.
--
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss