> > Will rtl_no_interrupts(), rtl_restore_interrupts() help
> > me in achieving this atomicity. But if a high priority
> > thread is kicked will the scheduler schedule this high
> > priority thread immediately ?
> 
> As far as I know, if interrupts are disabled, the thread can't be kicked. 
> Nothing can happen but the execution of the current code.
>
nop - rt-signals are not disabled by rtl_no_interrupts :

thread A (non periodic):

        while(1){
                rtl_no_interrupts(flags);
                pthread_suspend_np(pthread_selfe());
                ...wait for signal from other rt-thread...
                do_something();
                rtl_restore_interrtups(flags); 
        }

thread B (periodic thread):

        pthread_make_periodic_np(....)

        while(1){
                pthread_wait_np();
                pthread_kill(threadA,RTL_SIGNAL_WAKEUP);
        }

then hardware interrupts will be disabled for the critical section in thread 
A but the periodic thread B will still wake it up.

hofrat
_______________________________________________
Rtl mailing list
[EMAIL PROTECTED]
http://www2.fsmlabs.com/mailman/listinfo.cgi/rtl

Reply via email to