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:
@@ -1,7 +1,7 @@
|
||||
#include "syslib.h"
|
||||
#include <assert.h>
|
||||
#include <machine/archtypes.h>
|
||||
#include <timers.h>
|
||||
#include <minix/timers.h>
|
||||
|
||||
#include "kernel/config.h"
|
||||
#include "kernel/const.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "sysutil.h"
|
||||
#include <timers.h>
|
||||
#include <minix/timers.h>
|
||||
|
||||
/*===========================================================================*
|
||||
* tickdelay *
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
*/
|
||||
|
||||
#include "syslib.h"
|
||||
#include <timers.h>
|
||||
#include <minix/timers.h>
|
||||
#include <minix/sysutil.h>
|
||||
|
||||
static timer_t *timers = NULL;
|
||||
static minix_timer_t *timers = NULL;
|
||||
static int expiring = 0;
|
||||
|
||||
/*===========================================================================*
|
||||
* init_timer *
|
||||
*===========================================================================*/
|
||||
void init_timer(timer_t *tp)
|
||||
void init_timer(minix_timer_t *tp)
|
||||
{
|
||||
tmr_inittimer(tp);
|
||||
}
|
||||
@@ -29,7 +29,7 @@ void init_timer(timer_t *tp)
|
||||
/*===========================================================================*
|
||||
* set_timer *
|
||||
*===========================================================================*/
|
||||
void set_timer(timer_t *tp, int ticks, tmr_func_t watchdog, int arg)
|
||||
void set_timer(minix_timer_t *tp, int ticks, tmr_func_t watchdog, int arg)
|
||||
{
|
||||
int r;
|
||||
clock_t now, prev_time = 0, next_time;
|
||||
@@ -51,7 +51,7 @@ void set_timer(timer_t *tp, int ticks, tmr_func_t watchdog, int arg)
|
||||
/*===========================================================================*
|
||||
* cancel_timer *
|
||||
*===========================================================================*/
|
||||
void cancel_timer(timer_t *tp)
|
||||
void cancel_timer(minix_timer_t *tp)
|
||||
{
|
||||
clock_t next_time, prev_time;
|
||||
prev_time = tmrs_clrtimer(&timers, tp, &next_time);
|
||||
|
||||
Reference in New Issue
Block a user