next up previous contents index
Next: 11.3.5 signals_initsetsiginit: Get Up: 11.3 C Library Environment Previous: 11.3.3 exitsetexit: Get

11.3.4 getconsole, setconsole: Get and Set the console stream

 

SYNOPSIS

#include <oskit/com/libcenv.h>

oskit_error_t oskit_libcenv_getconsole(oskit_libcenv_t *c, oskit_ttystream_t **out_ttystream);
oskit_error_t oskit_libcenv_setconsole(oskit_libcenv_t *c, oskit_ttystream_t *ttystream);

DESCRIPTION

Get (or set) the system console object. The system console object defaults to a trivial stream implementation that uses the kernel console routines. Because the console is in use from the moment the kernel starts running, changing the console is more complicated than just using the setconsole method. The reader is encouraged to look at the example kernel in examples/x86/extended/console_tty, and the support code in startup/start_console.c.

PARAMETERS

c
The oskit_libcenv object to operate on.
out_ttystream
The oskit_ttystream object to return.
ttystream
The oskit_ttystream object to set.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



Utah Flux Research Group