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:
@@ -340,7 +340,7 @@ static void announce(void)
|
||||
void prepare_shutdown(const int how)
|
||||
{
|
||||
/* This function prepares to shutdown MINIX. */
|
||||
static timer_t shutdown_timer;
|
||||
static minix_timer_t shutdown_timer;
|
||||
|
||||
/* Continue after 1 second, to give processes a chance to get scheduled to
|
||||
* do shutdown work. Set a watchog timer to call shutdown(). The timer
|
||||
@@ -348,13 +348,13 @@ void prepare_shutdown(const int how)
|
||||
*/
|
||||
printf("MINIX will now be shut down ...\n");
|
||||
tmr_arg(&shutdown_timer)->ta_int = how;
|
||||
set_timer(&shutdown_timer, get_monotonic() + system_hz, minix_shutdown);
|
||||
set_kernel_timer(&shutdown_timer, get_monotonic() + system_hz, minix_shutdown);
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* shutdown *
|
||||
*===========================================================================*/
|
||||
void minix_shutdown(timer_t *tp)
|
||||
void minix_shutdown(minix_timer_t *tp)
|
||||
{
|
||||
/* This function is called from prepare_shutdown or stop_sequence to bring
|
||||
* down MINIX. How to shutdown is in the argument: RBT_HALT (return to the
|
||||
|
||||
Reference in New Issue
Block a user