The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
console_file.c File Reference
#include "console.h"
#include "termios.h"
#include "common/memory.h"
#include "common/stddef.h"
#include "drivers/keyboard/keyboard.h"
#include "kernel/errno.h"
#include "kernel/process/process.h"
#include "kernel/usermode/uaccess.h"
#include "kernel/vfs/file.h"
#include "kernel/vfs/poll.h"

Macros

#define CTRL(key)

Functions

void console_terminal_init (uint32_t init_pid)
 set up the console terminal: default settings, and init's session as the one it controls (with init's group in the foreground).
file_t * file_console (void)
 the console (keyboard in, screen out).

Macro Definition Documentation

◆ CTRL

#define CTRL ( key)
Value:
((key) & 0x1f)

Function Documentation

◆ console_terminal_init()

void console_terminal_init ( uint32_t init_pid)

set up the console terminal: default settings, and init's session as the one it controls (with init's group in the foreground).

call once at boot, before the first process runs.

Parameters
init_pidthe pid init will have (its session and group id).

◆ file_console()

file_t * file_console ( void )

the console (keyboard in, screen out).

there is one console description; every process starts with it on fds 0, 1 and 2.

Returns
the console description, with a new reference.