-/*!
- * Return a new timer picking and removing it from the available
- * timers pool. Return NULL if no more timers are available.
- */
-Timer *timer_new(void)
-{
- Timer *timer;
- cpuflags_t flags;
-
- DISABLE_IRQSAVE(flags);
-
- /* Should never happen */
- if (ISLISTEMPTY(&timers_pool))
- {
- ENABLE_IRQRESTORE(flags);
- DB(kprintf("Tmrspool empty\n");)
- return NULL;
- }
-
- /* Get a timer from the free pool */
- timer = (Timer *)timers_pool.head;
- REMOVE((Node *)timer);
-
- ENABLE_IRQRESTORE(flags);
-
- return timer;
-}
-
-
-/*!
- * Delete a timer, putting it in the available timers queue.
- */
-void timer_delete(Timer *timer)
-{
- cpuflags_t flags;
- DISABLE_IRQSAVE(flags);
- ADDHEAD(&timers_pool, &timer->link);
- ENABLE_IRQRESTORE(flags);
-}
-
-