IBNOS
Macros | Functions | Variables
Timer

Macros

#define TIMER_INTERRUPT_FREQUENCY   82 /* Hz */
 
#define TIMER_INTERRUPT_DELTA   12 /* ms */
 

Functions

struct timertimerCreate (bool wakeupAll)
 Creates a new kernel timer object. More...
 
void timerInit ()
 Initializes the system timer. More...
 
uint64_t timerGetTimestamp ()
 Returns the current kernel timestamp. More...
 

Variables

struct linkedList timerList = LL_INIT(timerList)
 

Detailed Description

Implementation of timer functions.

Macro Definition Documentation

◆ TIMER_INTERRUPT_DELTA

#define TIMER_INTERRUPT_DELTA   12 /* ms */

Definition at line 43 of file timer.c.

◆ TIMER_INTERRUPT_FREQUENCY

#define TIMER_INTERRUPT_FREQUENCY   82 /* Hz */

Definition at line 42 of file timer.c.

Function Documentation

◆ timerCreate()

struct timer* timerCreate ( bool  wakeupAll)

Creates a new kernel timer object.

This function allocates and returns the memory for a new kernel timer object, which expires after some time or periodically triggers an event.

Parameters
wakeupAllShould all waiting threads wake up on expire?
Returns
Pointer to the new kernel timer object

Definition at line 111 of file timer.c.

◆ timerGetTimestamp()

uint64_t timerGetTimestamp ( )

Returns the current kernel timestamp.

This function returns the current kernel timestamp, which represents the number of milliseconds since the system was booted.

Returns
Kernel timestmap

Definition at line 325 of file timer.c.

◆ timerInit()

void timerInit ( )

Initializes the system timer.

This function initializes the system timer which is used to schedule threads.

Definition at line 313 of file timer.c.

Variable Documentation

◆ timerList

struct linkedList timerList = LL_INIT(timerList)

Definition at line 47 of file timer.c.