blob: 7c0fc6e5f23c35666711b53c967e4ca73b2209ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef _TTY_H
#define _TTY_H
#include <kernel/sched.h>
#include <sys/types.h>
#define TTY_BUF_SIZE 1024
struct tty_queue {
unsigned pread;
unsigned pwrite;
struct task_struct *waiting;
char buf[TTY_BUF_SIZE];
};
struct tty_struct {
void (*init) (void);
void (*write) (void);
struct tty_queue rqueue;
struct tty_queue wqueue;
};
ssize_t tty_read(unsigned, void*, size_t);
ssize_t tty_write(unsigned, void*, size_t);
void tty_init(void);
#endif
|