46 DBGC ( &
timer,
"TIMER currticks() called before initialisation " 47 "from %p\n", __builtin_return_address ( 0 ) );
60 void udelay (
unsigned long usecs ) {
64 DBGC ( &
timer,
"TIMER udelay() called before initialisation " 65 "from %p\n", __builtin_return_address ( 0 ) );
78 void mdelay (
unsigned long msecs ) {
82 DBGC ( &
timer,
"TIMER mdelay() called before initialisation " 83 "from %p\n", __builtin_return_address ( 0 ) );
100 int ( * interrupted ) (
void ) ) {
104 for ( ; secs ; secs-- ) {
107 if ( interrupted && interrupted() )
133 unsigned int sleep (
unsigned int secs ) {
162 DBGC ( &
timer,
"TIMER could not initialise %s: %s\n",
167 DBGC ( &
timer,
"TIMER found no working timers!\n" );
struct arbelprm_rc_send_wqe rc
#define TICKS_PER_SEC
Number of ticks per second.
struct init_fn timer_init_fn __init_fn(INIT_EARLY)
Timer initialisation function.
#define INIT_EARLY
Early initialisation.
uint32_t start
Starting offset.
An initialisation function.
void(* udelay)(unsigned long usecs)
Delay for a fixed number of microseconds.
REQUIRE_OBJECT(config_timer)
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
REQUIRING_SYMBOL(timer_init_fn)
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
unsigned long(* currticks)(void)
Get current system time in ticks.
int getchar(void)
Read a single character from any console.
char * strerror(int errno)
Retrieve string representation of error number.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
int(* probe)(void)
Probe timer.
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
void cpu_nap(void)
Sleep with interrupts enabled until next CPU interrupt.
static struct timer * timer
Current timer.
void step(void)
Single-step a single process.
void sleep_fixed(unsigned int secs)
Sleep (uninterruptibly) for a fixed number of seconds.
static int keypress_interrupted(void)
Check if sleep has been interrupted by keypress.
#define TIMERS
Timer table.
static void timer_probe(void)
Find a working timer.
unsigned long currticks(void)
Get current system time in ticks.
static unsigned int sleep_interruptible(unsigned int secs, int(*interrupted)(void))
Sleep (possibly interruptibly) for a fixed number of seconds.
unsigned int sleep(unsigned int secs)
Sleep (interruptibly) for a fixed number of seconds.
#define NULL
NULL pointer (VOID *)
int iskey(void)
Check for available input on any console.