The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
pty.h File Reference
#include "common/stdint.h"

Go to the source code of this file.

Macros

#define PTY_MAX   16

Functions

void pty_init (void)
 register /dev/ptmx.
struct device * pty_slave_device (uint32_t index)
 the device of /dev/pts/N (devfs uses it to open the slave side).
bool pty_next (uint32_t *index)
 the lowest pair number at or above *index that exists (devfs lists them).

Macro Definition Documentation

◆ PTY_MAX

#define PTY_MAX   16

Function Documentation

◆ pty_init()

void pty_init ( void )

register /dev/ptmx.

call once at boot, after the device registry.

◆ pty_slave_device()

struct device * pty_slave_device ( uint32_t index)

the device of /dev/pts/N (devfs uses it to open the slave side).

Returns
the device, or NULL if pair N does not exist.

◆ pty_next()

bool pty_next ( uint32_t * index)

the lowest pair number at or above *index that exists (devfs lists them).

Parameters
indexin: where to start; out: the pair found.
Returns
false if there is none.