[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] OS questions
- To: David Olofson <david.olofson@reologica.se>
- Subject: Re: [rtl] OS questions
- From: Sven Heursch <Sven.Heursch@unibw-muenchen.de>
- Date: Thu, 02 Sep 1999 02:18:10 +0200
- References: <37CA9901.74ED6478@unibw-muenchen.de> <37CAA068.17B3E00A@reologica.se> <37CAB23F.3829A986@unibw-muenchen.de> <37CBE921.D92EB84E@reologica.se>
David Olofson wrote:
>
>
> > I am using a kill_proc() to send a signal to a standard linux user process.
> > It seems to me to work fine.
>
> From include/linux/sched.h:
>
> #define for_each_task(p) \
> for (p = &init_task ; (p = p->next_task) != &init_task ; )
>
> What happens if Linux is in the middle of removing or inserting a task
> just before of after the task you're sending the signal to when you come
> in preemting it?
>
> Also, from /kernel/exit.c, in function send_sig():
>
> save_flags(flags); cli();
> if ((sig == SIGKILL) || (sig == SIGCONT)) {
> if (p->state == TASK_STOPPED)
> wake_up_process(p);
> p->exit_code = 0;
> p->signal &= ~( (1<<(SIGSTOP-1)) | (1<<(SIGTSTP-1)) |
> (1<<(SIGTTIN-1)) | (1<<(SIGTTOU-1)) );
> }
> if (sig == SIGSTOP || sig == SIGTSTP || sig == SIGTTIN || sig ==
> SIGTTOU)
> p->signal &= ~(1<<(SIGCONT-1));
> restore_flags(flags);
>
> 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?
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?
TIA
S. Heursch
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/