[Prev][Next][Index][Thread]

MiniGUI & Bug report for pthread_kill



Hello Everyone:
1. There are some Window Manager System called MiniGUI  (like wimpl ,but based on svgalib) can be integrated into oskit. 
     Is there some body  in charge of  the uploading of some package?
     
2. Bug report for pthread_kill
    when user set the sigaction of SIGALRM to the sig_handler ,  after call setitimer , OSKIT  shall send SIGALRM to the sig_handler  everytime.
    But for OSKIT 990722, when  the thread which who called setitimer was conditional waiting, the  the sig_handler will not be called .
    This is caused by  when every time Interrupt coming in,  fdev_handle_clock call  handle, handle send signal SIGALRM to the thread do setitimer .It is the pthread_sched_reschedule do the SIGCHECK and call the sig_handler at beginning of the thread get it is control.     
   But for now the waiting threads never get controls.

The problem is : Does following correction of the pthread_signal.c:297 correct ? 
     pthread_kill
	 in function pthread_kill_ ,there are code to do the remove of wait condition 
	 if (pthread->waitflags & THREAD_WS_CONDWAIT) {
		struct pthread_cond_impl *pimpl = pthread->waitcond->impl;

		pthread_lock(&(pimpl->lock));
		/*
		 * The thread was still on the Q, so its safe to change
		 * its state to reflect that it is not longer waiting
		 * on the condition.
		 *
		 * If the thread was not on the Q, we caught the race,
		 * and do not have to do anything.
		 */
		if (pthread_remove_fromQ(&(pimpl->waiters), pthread)) {
			pthread->waitflags &= ~THREAD_WS_CONDWAIT;
			pthread->waitcond   = 0;
			pthread_unlock(&(pimpl->lock));
			pthread_unlock(&pthread->waitlock);
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> The changes 
						pthread_sched_setrunnable(pthread);
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> shall we add the pthread active queue ?
			return 0;
		}

		pthread_unlock(&(pimpl->lock));
		pthread_unlock(&pthread->waitlock);
		return 0;
        }
   

Thanks and Best Regards
HuWeiPing    hwp@acm.org  
胡伟平   wph@ict.ac.cn 中国科学院计算技术研究所