Subj : Re: nptl and signals To : comp.programming.threads From : divijbhatt@gmail.com Date : Tue Jul 26 2005 07:32 am Joe Seigh wrote: > divijbhatt@gmail.com wrote: > > Hi, > > I am masking the per thread signal mask but when I use sigwait > > the signal will be delivered to the process which in turn delivers the > > signal to the > > threads randomly in a process and that is the rule of NPTL and most > > importantly how signal/sigaction will determine that it is the thread > > to which the signal has to be delivered. > > > No, it's the rules of Posix that apply here. I don't know why you're > mixing up signals and NPTL. What are you attempting to do with > signals and threads? > Hi, See,I whether u r convinced or not that it is the rule of NPTL I am gtng the same behaviour on my linux 2.6.10 kernel on FC2 with glibc 3.3.3 1.I am creating three threads in the main program 2.I and setting the time for each thread in thread function using setitimer() 3.After the expiraton of timer SIGALRM is called which called signal() asynchronously 4.In signal handler function I am setting the flag 5.In main function I am checking that if that flag is 1 then I do some work there and again make that flag 0. But PROBLEM is:-------> 1.I am not gtng signals properly in my signal handler function some signals are dropping.The signals are deliverd to the threads randomly. ****I am using sigwait,pthread_sigmask(in main program),sempahore(in signal handler) also. Divij > > -- > Joe Seigh > > When you get lemons, you make lemonade. > When you get hardware, you make software. .