BTW: I've tried to explain some of this in the html man files that will
be on the next pre-release.
On Thu, Sep 14, 2000 at 04:18:00PM -0400, Stephen D. Cohen wrote:
> Gang,
>
> With all the mention of contexts and ISRs, I am quite confused. A
> few quick questions, probably for the folks at FSM labs:
>
> 1) If I have an ISR that wakes up a process using pthread_wakeup_np, am I
> now executing the process in the context of the ISR, or does the ISR
> complete (returning me to regular RT context) before the task is awoken?
> The task was originally put to sleep with pthread_suspend_np.
neither! Suppose thread A is running and there is an interrupt which starts
and ISR and the ISR does a pthread_wakeup of thread B.
there are three possibilities
Priority of B > Priority of A
the wakeup calls the scheduler and we switch into
the context of B. When B waits or otherwise gives
up the processor, if A is now the highest priority runnable
thread, A will restart -- in the ISR -- the ISR returns
and we pop back into B. So COMPLETE ALL HARDWARE HANDSHAKING
BEFORE CALLING RTL_WAKEUP_NP IN THE ISR
Priority of B <= Priority A
B is marked runnable, the ISR returns to A, when A completes, B runs
A and B are the same:
B is marked runnable -- no change, the ISR returns to A
> 2) If the task awoken from the ISR was not the highest priority computable
> thread, does it still get the processor? If so, for how long?
nope. The scheduler is simple: the highest priority runnable thead runs.
> 3) In what context, and at what priority, do FIFO handlers execute? Will a
> FIFO handler pre-empt a running RT task, or do they simply wait and execute
> ahead of a low priority task like, say, Linux?
The user handlers run in Linux kernel time during the read/write system
calls. The rt handlers run in RT space during the rtf_put/get.
>
> ------------------------------------------
> Stephen D. Cohen, Engineering Manager
> Xybion Positioning Systems
> 11528 53rd Street North
> Clearwater, FLA 33760
> phone: (727) 299-0150, fax: (727) 299-0804
> ------------------------------------------
>
> -- [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/
--
---------------------------------------------------------
Victor Yodaiken
Finite State Machine Labs: The RTLinux Company.
www.fsmlabs.com www.rtlinux.com
-- [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/