Moved stime, time, times POSIX calls from FS to PM. Removed child time
accounting from kernel (now in PM). Large amount of files in this commit is due to system time problems during development.
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
* m4_l1: T_PROC_NR (get info for this process)
|
||||
* m4_l1: T_USER_TIME (return values ...)
|
||||
* m4_l2: T_SYSTEM_TIME
|
||||
* m4_l3: T_CHILD_UTIME
|
||||
* m4_l4: T_CHILD_STIME
|
||||
* m4_l5: T_BOOT_TICKS
|
||||
*/
|
||||
|
||||
@@ -31,11 +29,9 @@ register message *m_ptr; /* pointer to request message */
|
||||
rp = proc_addr(m_ptr->T_PROC_NR);
|
||||
|
||||
lock(); /* halt the volatile time counters in rp */
|
||||
m_ptr->T_USER_TIME = rp->user_time;
|
||||
m_ptr->T_SYSTEM_TIME = rp->sys_time;
|
||||
m_ptr->T_USER_TIME = rp->p_user_time;
|
||||
m_ptr->T_SYSTEM_TIME = rp->p_sys_time;
|
||||
unlock();
|
||||
m_ptr->T_CHILD_UTIME = rp->child_utime;
|
||||
m_ptr->T_CHILD_STIME = rp->child_stime;
|
||||
}
|
||||
m_ptr->T_BOOT_TICKS = get_uptime();
|
||||
return(OK);
|
||||
|
||||
@@ -57,10 +57,8 @@ register message *m_ptr; /* pointer to request message */
|
||||
rpc->p_pendcount = 0;
|
||||
rpc->p_reg.retreg = 0; /* child sees pid = 0 to know it is child */
|
||||
|
||||
rpc->user_time = 0; /* set all the accounting times to 0 */
|
||||
rpc->sys_time = 0;
|
||||
rpc->child_utime = 0;
|
||||
rpc->child_stime = 0;
|
||||
rpc->p_user_time = 0; /* set all the accounting times to 0 */
|
||||
rpc->p_sys_time = 0;
|
||||
|
||||
return(OK);
|
||||
}
|
||||
@@ -139,7 +137,6 @@ register message *m_ptr; /* pointer to request message */
|
||||
reg_t sp; /* new sp */
|
||||
phys_bytes phys_name;
|
||||
char *np;
|
||||
#define NLEN (sizeof(rp->p_name)-1)
|
||||
|
||||
rp = proc_addr(m_ptr->PR_PROC_NR);
|
||||
assert(isuserp(rp));
|
||||
@@ -163,11 +160,13 @@ register message *m_ptr; /* pointer to request message */
|
||||
|
||||
/* Save command name for debugging, ps(1) output, etc. */
|
||||
phys_name = numap_local(m_ptr->m_source, (vir_bytes) m_ptr->PR_NAME_PTR,
|
||||
(vir_bytes) NLEN);
|
||||
(vir_bytes) P_NAME_LEN - 1);
|
||||
if (phys_name != 0) {
|
||||
phys_copy(phys_name, vir2phys(rp->p_name), (phys_bytes) NLEN);
|
||||
phys_copy(phys_name, vir2phys(rp->p_name), (phys_bytes) P_NAME_LEN - 1);
|
||||
for (np = rp->p_name; (*np & BYTE) >= ' '; np++) {}
|
||||
*np = 0;
|
||||
*np = 0; /* mark end */
|
||||
} else {
|
||||
kstrncpy(rp->p_name, "<unset>", P_NAME_LEN);
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
@@ -201,17 +200,6 @@ message *m_ptr; /* pointer to request message */
|
||||
if (! isokprocn(exit_proc_nr)) return(EINVAL);
|
||||
rc = proc_addr(exit_proc_nr);
|
||||
|
||||
/* If this is a user process and the PM passed in a valid parent process,
|
||||
* accumulate the child times at the parent.
|
||||
*/
|
||||
if (isuserp(rc) && isokprocn(m_ptr->PR_PPROC_NR)) {
|
||||
rp = proc_addr(m_ptr->PR_PPROC_NR);
|
||||
lock();
|
||||
rp->child_utime += rc->user_time + rc->child_utime;
|
||||
rp->child_stime += rc->sys_time + rc->child_stime;
|
||||
unlock();
|
||||
}
|
||||
|
||||
/* 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 resets important process table fields.
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "../kernel.h"
|
||||
#include "../ipc.h"
|
||||
#include "../system.h"
|
||||
#include "../protect.h"
|
||||
#include <sys/svrctl.h>
|
||||
@@ -97,6 +98,7 @@ message *m_ptr; /* pointer to request message */
|
||||
/* fall through */
|
||||
}
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user