TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: Bob van der Poel 76510,2203 (X)
from: Mark Wuest 74030,332
date: 1991-09-09 08:59:25
subject: #12116-#Intercepts

#: 12147 S12/OS9/68000 (OSK)
    09-Sep-91  08:59:25
Sb: #12116-#Intercepts
Fm: Mark Wuest 74030,332
To: Bob van der Poel 76510,2203 (X)

Bob,
 AS you've been told, you are not in system state when you go to your signal
trap. I assume by intercept mode you mean you have a line
 intercept(sigtrap);
 somewhere. What happens when you get a signal is this:
 (You cannot get one in the middle of a time slice, BTW)
 1 It is your process'es turn at the cpu (your time slice is coming).
 2 The kernel looks to see if you have any signals pending *before* switching
   to your task.
 3 If you have done an intercept() call, it executes the function you pointed
   to, pasing the signal as an int.
 4 *If* and when you return() from the signal trap, your process continues
   execution where it left off when its last time slice was up.
 The reason MW says to limit what you do in a signal trap is because you don't
want to risk missing a signal. If you were to do a sleep() in the signal trap,
10 processes could send signals to you, but you would only "get" the last one.














































































 (continues)

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.