Barrelfish
Macros | Functions | Variables
kernel.h File Reference

Standard headers for kernel code. More...

Macros

#define ARRAY_LENGTH(x)   (sizeof(x) / sizeof((x)[0]))
 
#define ROUND_UP(n, size)   ((((n) + (size) - 1)) & (~((size) - 1)))
 Round up n to the next multiple of size.
 

Functions

void kernel_startup_early (void)
 Kernel's early startup code, called from arch-specific bootstrap.
 

Variables

systime_t kernel_timeslice
 The kernel timeslice given in system ticks. More...
 
unsigned int config_timeslice
 
bool kernel_ticks_enabled
 
lvaddr_t kernel_trace_buf
 

Detailed Description

Standard headers for kernel code.

All C source in the kernel should include this file first. This file should contain only definitions and prototypes that are required for the majority of kernel code.

Macro Definition Documentation

#define ARRAY_LENGTH (   x)    (sizeof(x) / sizeof((x)[0]))

Macro to return the number of entries in a statically-allocated array.

Variable Documentation

unsigned int config_timeslice

command-line option for kernel timeslice in milliseconds

bool kernel_ticks_enabled

variable for gating timer interrupts.

'true' if kernel should handle and context switch on timer ticks. Pass the ticks parameter on the kernel command line if you want to change this.

systime_t kernel_timeslice

The kernel timeslice given in system ticks.

kernel timeslice in system ticks

lvaddr_t kernel_trace_buf

Kernel trace buffer