Barrelfish
Functions
syscalls.c File Reference

User-side system call implementation, architecture-independent. More...

Functions

errval_t sys_yield (capaddr_t target)
 Yield the CPU. More...
 
errval_t sys_suspend (bool halt)
 
errval_t sys_print (const char *string, size_t length)
 Print a string through the kernel. More...
 

Detailed Description

User-side system call implementation, architecture-independent.

Function Documentation

errval_t sys_print ( const char *  string,
size_t  length 
)

Print a string through the kernel.

This calls SYSCALL_PRINT to print 'string' of length 'length' through the kernel. Whether and where 'string' is printed is determined by the kernel.

Parameters
stringPointer to string to print.
lengthLength of string.
Returns
Syscall error code (#SYS_ERR_OK on success).
errval_t sys_suspend ( bool  halt)

Suspend the current cpu

errval_t sys_yield ( capaddr_t  target)

Yield the CPU.

Yields the remainder of the time-slice for this dispatcher to the next runnable dispatcher.

Parameters
targetDispatcher to yield to, or CPTR_NULL for an undirected yield
Returns
Syscall error code (#SYS_ERR_OK on success).