tmr_inittimer(&rmp->mp_timer);
rmp->mp_fs_call= PM_IDLE;
+ rmp->mp_fs_call2= PM_IDLE;
}
/* Build the set of signals which cause core dumps, and the set of signals
for (rmp= mproc; rmp < &mproc[NR_PROCS]; rmp++)
{
call= rmp->mp_fs_call;
+ if (call == PM_IDLE)
+ call= rmp->mp_fs_call2;
if (call == PM_IDLE)
continue;
switch(call)
break;
case PM_UNPAUSE:
+ m.m_type= call;
+ m.PM_UNPAUSE_PROC= rmp->mp_endpoint;
+
+ /* FS does not reply */
+ rmp->mp_fs_call2= PM_IDLE;
+
+ /* Ask the kernel to deliver the signal */
+ r= sys_sigsend(rmp->mp_endpoint,
+ &rmp->mp_sigmsg);
+ if (r != OK)
+ panic(__FILE__,"sys_sigsend failed",r);
+
+ break;
+
case PM_UNPAUSE_TR:
m.m_type= call;
m.PM_UNPAUSE_PROC= rmp->mp_endpoint;
/* FS does not reply */
rmp->mp_fs_call= PM_IDLE;
- if (call == PM_UNPAUSE)
- {
- /* Ask the kernel to deliver the signal */
- r= sys_sigsend(rmp->mp_endpoint,
- &rmp->mp_sigmsg);
- if (r != OK)
- panic(__FILE__,"sys_sigsend failed",r);
- }
-
break;
case PM_EXEC:
if (m.m_type != PM_IDLE)
{
if (rmp->mp_fs_call == PM_IDLE &&
+ rmp->mp_fs_call2 == PM_IDLE &&
(rmp->mp_flags & PM_SIG_PENDING))
{
rmp->mp_flags &= ~PM_SIG_PENDING;
message mp_reply; /* reply message to be sent to one */
/* Communication with FS */
- int mp_fs_call;
+ int mp_fs_call; /* Record the call for normal system calls */
+ int mp_fs_call2; /* Record the call for signals */
char *mp_exec_path; /* Path of executable */
vir_bytes mp_exec_path_len; /* Length of path (including nul) */
char *mp_exec_frame; /* Arguments */
signo, (rmp->mp_flags & ZOMBIE) ? "zombie" : "dead", slot);
panic(__FILE__,"", NO_NUM);
}
- if (rmp->mp_fs_call != PM_IDLE)
+ if (rmp->mp_fs_call != PM_IDLE || rmp->mp_fs_call2 != PM_IDLE)
{
sigaddset(&rmp->mp_sigpending, signo);
rmp->mp_flags |= PM_SIG_PENDING;
}
/* Process is not hanging on an PM call. Ask FS to take a look. */
- if (rmp->mp_fs_call != PM_IDLE)
- panic("pm", "unpause: not idle", rmp->mp_fs_call);
- rmp->mp_fs_call= (for_trace ? PM_UNPAUSE_TR : PM_UNPAUSE);
+ if (for_trace)
+ {
+ if (rmp->mp_fs_call != PM_IDLE)
+ panic( __FILE__, "unpause: not idle", rmp->mp_fs_call);
+ rmp->mp_fs_call= PM_UNPAUSE_TR;
+ }
+ else
+ {
+ if (rmp->mp_fs_call2 != PM_IDLE)
+ panic( __FILE__, "unpause: not idle", rmp->mp_fs_call2);
+ rmp->mp_fs_call2= PM_UNPAUSE;
+ }
r= notify(FS_PROC_NR);
if (r != OK) panic("pm", "unpause: unable to notify FS", r);
}