From: Jorrit Herder Date: Wed, 10 Aug 2005 09:37:54 +0000 (+0000) Subject: Renamed mm_exit to pm_exit (requested by Al) X-Git-Tag: v3.1.0~382 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/host.html?a=commitdiff_plain;h=ab732a37e8882ae26c56a0b4177d62d565924a34;p=minix.git Renamed mm_exit to pm_exit (requested by Al) Small cleanup in pm_init. --- diff --git a/servers/pm/forkexit.c b/servers/pm/forkexit.c index e396b6db0..20acb75b2 100644 --- a/servers/pm/forkexit.c +++ b/servers/pm/forkexit.c @@ -8,8 +8,8 @@ * * The entry points into this file are: * do_fork: perform the FORK system call - * do_mm_exit: perform the EXIT system call (by calling mm_exit()) - * mm_exit: actually do the exiting + * do_pm_exit: perform the EXIT system call (by calling pm_exit()) + * pm_exit: actually do the exiting * do_wait: perform the WAITPID or WAIT system call */ @@ -108,22 +108,22 @@ PUBLIC int do_fork() /*===========================================================================* - * do_mm_exit * + * do_pm_exit * *===========================================================================*/ -PUBLIC int do_mm_exit() +PUBLIC int do_pm_exit() { -/* Perform the exit(status) system call. The real work is done by mm_exit(), +/* Perform the exit(status) system call. The real work is done by pm_exit(), * which is also called when a process is killed by a signal. */ - mm_exit(mp, m_in.status); + pm_exit(mp, m_in.status); return(SUSPEND); /* can't communicate from beyond the grave */ } /*===========================================================================* - * mm_exit * + * pm_exit * *===========================================================================*/ -PUBLIC void mm_exit(rmp, exit_status) +PUBLIC void pm_exit(rmp, exit_status) register struct mproc *rmp; /* pointer to the process to be terminated */ int exit_status; /* the process' exit status (for parent) */ { diff --git a/servers/pm/main.c b/servers/pm/main.c index 8a95710a0..636f8a810 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -143,8 +143,6 @@ PRIVATE void pm_init() static char core_sigs[] = { SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGEMT, SIGFPE, SIGUSR1, SIGSEGV, SIGUSR2 }; static char ign_sigs[] = { SIGCHLD }; - static int protected[] = {PM_PROC_NR, FS_PROC_NR, SM_PROC_NR, - TTY_PROC_NR, DRVR_PROC_NR, MEM_PROC_NR}; register struct mproc *rmp; register char *sig_ptr; phys_clicks total_clicks, minix_clicks, free_clicks; @@ -197,18 +195,16 @@ PRIVATE void pm_init() /* Set process details found in the image table. */ rmp = &mproc[ip->proc_nr]; strncpy(rmp->mp_name, ip->proc_name, PROC_NAME_LEN); + rmp->mp_parent = SM_PROC_NR; if (ip->proc_nr == INIT_PROC_NR) { /* user process */ rmp->mp_pid = INIT_PID; - rmp->mp_parent = PM_PROC_NR; rmp->mp_flags |= IN_USE; - rmp->mp_nice = 0; - sigemptyset(&rmp->mp_ignore); + sigemptyset(&rmp->mp_ignore); } else { /* system process */ rmp->mp_pid = get_free_pid(); - rmp->mp_parent = SM_PROC_NR; rmp->mp_flags |= IN_USE | DONT_SWAP | PRIV_PROC; - sigfillset(&rmp->mp_ignore); + sigfillset(&rmp->mp_ignore); } sigemptyset(&rmp->mp_sigmask); sigemptyset(&rmp->mp_catch); @@ -235,9 +231,6 @@ PRIVATE void pm_init() /* Override some details. PM is somewhat special. */ mproc[PM_PROC_NR].mp_pid = PM_PID; /* magically override pid */ mproc[PM_PROC_NR].mp_parent = PM_PROC_NR; /* PM doesn't have parent */ - for (i=0; imp_reply.reply_trace = 0; return(OK); case T_RESUME: