Removed 'tracing' flag from sys_exec. Logic is now local to PM.

Changed variable names in timers libary. Wrote new comments for
timers.h header file with explanation.
This commit is contained in:
Jorrit Herder 2005-07-20 15:33:54 +00:00
parent d2d975246d
commit ee509198a2
3 changed files with 11 additions and 13 deletions

View file

@ -23,7 +23,7 @@
_PROTOTYPE( int _taskcall, (int who, int syscallnr, message *msgptr) );
_PROTOTYPE( int sys_abort, (int how, ...) );
_PROTOTYPE( int sys_exec, (int proc, char *ptr, int traced,
_PROTOTYPE( int sys_exec, (int proc, char *ptr,
char *aout, vir_bytes initpc) );
_PROTOTYPE( int sys_fork, (int parent, int child, int pid) );
_PROTOTYPE( int sys_newmap, (int proc, struct mem_map *ptr) );

View file

@ -1,9 +1,8 @@
#include "syslib.h"
PUBLIC int sys_exec(proc, ptr, traced, prog_name, initpc)
PUBLIC int sys_exec(proc, ptr, prog_name, initpc)
int proc; /* process that did exec */
char *ptr; /* new stack pointer */
int traced; /* is tracing enabled? */
char *prog_name; /* name of the new program */
vir_bytes initpc;
{
@ -12,7 +11,6 @@ vir_bytes initpc;
message m;
m.PR_PROC_NR = proc;
m.PR_TRACING = traced;
m.PR_STACK_PTR = ptr;
m.PR_NAME_PTR = prog_name;
m.PR_IP_PTR = (char *)initpc;

View file

@ -3,21 +3,21 @@
/*===========================================================================*
* tmrs_clrtimer *
*===========================================================================*/
clock_t tmrs_clrtimer(tmrs, tp, new_head)
clock_t tmrs_clrtimer(tmrs, tp, next_time)
timer_t **tmrs; /* pointer to timers queue */
timer_t *tp; /* timer to be removed */
clock_t *new_head;
clock_t *next_time;
{
/* Deactivate a timer and remove it from the timers queue.
*/
timer_t **atp;
struct proc *p;
clock_t old_head = 0;
clock_t prev_time;
if(*tmrs)
old_head = (*tmrs)->tmr_exp_time;
prev_time = (*tmrs)->tmr_exp_time;
else
old_head = 0;
prev_time = 0;
tp->tmr_exp_time = TMR_NEVER;
@ -28,13 +28,13 @@ clock_t *new_head;
}
}
if(new_head) {
if(next_time) {
if(*tmrs)
*new_head = (*tmrs)->tmr_exp_time;
*next_time = (*tmrs)->tmr_exp_time;
else
*new_head = 0;
*next_time = 0;
}
return old_head;
return prev_time;
}