From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7176 invoked by alias); 30 Jan 2003 17:20:39 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 7169 invoked from network); 30 Jan 2003 17:20:37 -0000 Received: from unknown (HELO ws9.cdotb.ernet.in) (202.41.72.121) by 172.16.49.205 with SMTP; 30 Jan 2003 17:20:37 -0000 Received: from cdotb.ernet.in ([192.168.51.209]) by ws9.cdotb.ernet.in (8.9.3/8.9.3) with ESMTP id WAA05904; Thu, 30 Jan 2003 22:29:41 +0500 (GMT+0500) Message-ID: <3E395FAF.3070306@cdotb.ernet.in> Date: Thu, 30 Jan 2003 17:46:00 -0000 From: "N.Suresh" Organization: C-DoT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "N.Suresh" CC: Nick Garnett , ecos-discuss , Prakash R , Shiv Kumar , Titty Thomas References: <3E380BCE.9010201@cdotb.ernet.in> <3E38CA39.6040804@cdotb.ernet.in> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [ECOS] sigwait not returning X-SW-Source: 2003-01/txt/msg00443.txt.bz2 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? regards sigaddset( &sig_pending, signo ); // Wake up any threads in sigsuspend() and sigwait(). if (!signal_sigwait.get_queue()->empty()) { signal_sigwait.broadcast(); } else { cyg_posix_pthread_release_thread( &sig_pending ); } N.Suresh wrote: >> >> >> Try this instead: >> >> pthread_sigmask (SIG_BLOCK, &set, (sigset_t*)NULL); >> >> >> > I had tried this before. It didn't work. > So i tried to unblock all the signals in the thread itself. > > If i don't do this, in alarm_action () function, the check whether any > thread is waiting for the signal is failing and > it is simply returning. > > regards > -- !============================================================================! = Suresh N., Research Engineer, C-DoT, Bangalore. = = Call me at : OFF: 2383951(Dir) / 2263399 (268) RES: 3334248 = = Alternate email : nsur_mys@rediffmail.com = = QOT: Modern man is the missing link between apes and human beings. !============================================================================! -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss