Added a kind-of-working openpty()
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include "sys/fs/node.h"
|
||||
#include "sys/ring.h"
|
||||
#include "sys/chr.h"
|
||||
|
||||
struct pty {
|
||||
int number;
|
||||
vnode_t *master;
|
||||
vnode_t *slave;
|
||||
// TODO: winsize/termios
|
||||
|
||||
struct chrdev dev_master;
|
||||
struct chrdev dev_slave;
|
||||
|
||||
// Slave reads
|
||||
// Master writes
|
||||
struct ring ring_input;
|
||||
// Slave writes
|
||||
// Master reads
|
||||
struct ring ring_output;
|
||||
int owner_pid;
|
||||
};
|
||||
|
||||
struct pty *pty_create(void);
|
||||
@@ -18,4 +18,6 @@
|
||||
#define SYSCALL_NR_EXIT 60
|
||||
#define SYSCALL_NR_KILL 62
|
||||
#define SYSCALL_NR_GETTIMEOFDAY 96
|
||||
|
||||
#define SYSCALL_NRX_OPENPTY 118
|
||||
#define SYSCALL_NRX_SIGRET 119
|
||||
|
||||
Reference in New Issue
Block a user