On Thu, 02 Sep 1999, Sven Heursch wrote:
[...function send_sig()...]
> > The cli() has no effect on RTL tasks/ISRs... You'll get away with it
> > most of the time, but it's not safe.
> 
> Yes thx, I understand this, but it works fine with the kill_proc() call within
> the RT-ISR. Or do you have a better idea, how to send a signal to a linux process
> from within a RT-ISR?

Well, the risk of colliding with the kernel adding/removing tasks is small, but
if you have other tasks sending signals, you'll probably start missing signals
and that kind of things...

The correct way it to set up a bottom half to do it, and trigger that using
rtl_global_pend_irq().

> A last question:
> 
> When an interrupt occurs and the ISR starts and ends after a while, is there a
> schedule() call or is only the variable resched set ?
> If not, how does the timerinterrupt motivate the scheduler to schedule an
> event NOW?

The answer is probably somewhere around linux/kernel/sched.c, but I'll have to
study that more carefully to give an exact answer... AFAIK, the HZ interrupt
either reschedules directly, or makes sure the currently executing kernel call
will do it before it returns to user space. (Don't know exactly how, but
obviously, the scheduling must be done before returning to the interrupted
context, or you wouldn't be able to switch out a user space task before it makes
a system call... Would be almost as useless as Win16! *hehe*)

That's for standard Linux; RTL ISRs won't affect the standard kernel's
scheduling at all, just steal some CPU time.


//David

    _       _     _       __      ˇRock solid       .------------ˇˇ ˇ
   /_\ /  // \ / /_\ /  / / /__/  ˇ<1 ms latency    | Audio hacker
  /  //__//__// /  //_ / /   _/   ˇPlug-ins         | Singer/composer
    Professional Linux Audio      ˇFree/Open Source | Linux advocate
ˇ ˇˇ------------------------------------------------'
David Olofson ˇ www.angelfire.com/or/audiality ˇ [EMAIL PROTECTED]
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to