Cleaned up process table structure: removed p_type, p_pendcount.

Removed stop sequence when MINIX is shut down.
Disabled send mask checks --- to be replaced by proper mechanism.
Fixed bug relating to 'shutdown -x'.
Simplified clock accounting of realtime.
Updated Makefiles for mkdept script.
This commit is contained in:
Jorrit Herder
2005-06-24 16:24:40 +00:00
parent 5654996c07
commit a408699ce0
19 changed files with 153 additions and 630 deletions

View File

@@ -1,14 +1,3 @@
/* The system call implemented in this file:
* m_type: SYS_EXIT
*
* The parameters for this system call are:
* m1_i1: EXIT_STATUS (exit status, 0 if normal exit)
*
* Author:
* Jorrit N. Herder <jnherder@cs.vu.nl>
*/
#include "../kernel.h"
#include "../ipc.h"
#include "../system.h"
@@ -16,36 +5,6 @@
#include <sys/svrctl.h>
#include "../sendmask.h"
/*===========================================================================*
* do_exit *
*===========================================================================*/
PUBLIC int do_exit(m_ptr)
message *m_ptr; /* pointer to request message */
{
/* Handle sys_exit. A server or driver wants to exit. This may happen
* on a panic, but also is done when MINIX is shutdown.
*/
int proc_nr = m_ptr->m_source; /* can only exit own process */
if (m_ptr->EXIT_STATUS != 0) {
kprintf("WARNING: system process %d exited with an error.\n", proc_nr );
}
/* Now call the routine to clean up of the process table slot. This cancels
* outstanding timers, possibly removes the process from the message queues,
* and reset important process table fields.
*/
clear_proc(proc_nr);
/* If the shutdown sequence is active, see if it was awaiting the shutdown
* of this system service. If so, directly continue the stop sequence.
*/
if (shutting_down && shutdown_process == proc_addr(proc_nr)) {
stop_sequence(&shutdown_timer);
}
return(EDONTREPLY); /* no reply is sent */
}
/* The system call implemented in this file:
@@ -98,7 +57,6 @@ message *m_ptr; /* pointer to request message */
}
case SYSSENDMASK: {
rp->p_call_mask = SYSTEM_CALL_MASK;
rp->p_type = P_SERVER;
rp->p_sendmask = ALLOW_ALL_MASK;
send_mask_allow(proc_addr(USR8139)->p_sendmask, proc_nr);
send_mask_allow(proc_addr(PM_PROC_NR)->p_sendmask, proc_nr);