Replacing timer_t by netbsd's timer_t

* Renamed struct timer to struct minix_timer
 * Renamed timer_t to minix_timer_t
 * Ensured all the code uses the minix_timer_t typedef
 * Removed ifdef around _BSD_TIMER_T
 * Removed include/timers.h and merged it into include/minix/timers.h
 * Resolved prototype conflict by renaming kernel's (re)set_timer
   to (re)set_kernel_timer.

Change-Id: I56f0f30dfed96e1a0575d92492294cf9a06468a5
This commit is contained in:
2013-09-19 10:57:10 +02:00
parent 214c4e152b
commit 9fab85c2de
67 changed files with 256 additions and 278 deletions

View File

@@ -48,7 +48,7 @@ int do_clear(struct proc * caller, message * m_ptr)
clear_endpoint(rc);
/* Turn off any alarm timers at the clock. */
reset_timer(&priv(rc)->s_alarm_timer);
reset_kernel_timer(&priv(rc)->s_alarm_timer);
/* Make sure that the exiting process is no longer scheduled,
* and mark slot as FREE. Also mark saved fpu contents as not significant.

View File

@@ -113,7 +113,7 @@ int do_privctl(struct proc * caller, message * m_ptr)
priv(rp)->s_notify_pending.chunk[i] = 0; /* - notifications */
priv(rp)->s_int_pending = 0; /* - interrupts */
(void) sigemptyset(&priv(rp)->s_sig_pending); /* - signals */
reset_timer(&priv(rp)->s_alarm_timer); /* - alarm */
reset_kernel_timer(&priv(rp)->s_alarm_timer); /* - alarm */
priv(rp)->s_asyntab= -1; /* - asynsends */
priv(rp)->s_asynsize= 0;

View File

@@ -14,7 +14,7 @@
#if USE_SETALARM
static void cause_alarm(timer_t *tp);
static void cause_alarm(minix_timer_t *tp);
/*===========================================================================*
* do_setalarm *
@@ -24,7 +24,7 @@ int do_setalarm(struct proc * caller, message * m_ptr)
/* A process requests a synchronous alarm, or wants to cancel its alarm. */
long exp_time; /* expiration time for this alarm */
int use_abs_time; /* use absolute or relative time */
timer_t *tp; /* the process' timer structure */
minix_timer_t *tp; /* the process' timer structure */
clock_t uptime; /* placeholder for current uptime */
/* Extract shared parameters from the request message. */
@@ -47,10 +47,10 @@ int do_setalarm(struct proc * caller, message * m_ptr)
/* Finally, (re)set the timer depending on the expiration time. */
if (exp_time == 0) {
reset_timer(tp);
reset_kernel_timer(tp);
} else {
tp->tmr_exp_time = (use_abs_time) ? exp_time : exp_time + get_monotonic();
set_timer(tp, tp->tmr_exp_time, tp->tmr_func);
set_kernel_timer(tp, tp->tmr_exp_time, tp->tmr_func);
}
return(OK);
}
@@ -58,7 +58,7 @@ int do_setalarm(struct proc * caller, message * m_ptr)
/*===========================================================================*
* cause_alarm *
*===========================================================================*/
static void cause_alarm(timer_t *tp)
static void cause_alarm(minix_timer_t *tp)
{
/* Routine called if a timer goes off and the process requested a synchronous
* alarm. The process number is stored in timer argument 'ta_int'. Notify that