vm: fix a null dereference on out-of-memory
[minix.git] / drivers / log / log.h
blob98129c2d8294ec6ae0a3809d6f8c4aa30a5811c6
1 /* Includes. */
2 #include <minix/drivers.h>
3 #include <minix/chardriver.h>
4 #include <minix/type.h>
5 #include <minix/const.h>
6 #include <minix/com.h>
7 #include <sys/types.h>
8 #include <minix/ipc.h>
10 /* Constants and types. */
12 #define LOG_SIZE (50*1024)
13 #define SUSPENDABLE 1
15 struct logdevice {
16 char log_buffer[LOG_SIZE];
17 int log_size, /* no. of bytes in log buffer */
18 log_read, /* read mark */
19 log_write; /* write mark */
20 #if SUSPENDABLE
21 endpoint_t log_proc_nr,
22 log_source;
23 int log_iosize,
24 log_revive_alerted,
25 log_status;
26 cp_grant_id_t log_user_grant;
27 vir_bytes log_user_offset;
28 #endif
29 int log_selected, log_select_proc,
30 log_select_alerted, log_select_ready_ops;
33 /* Function prototypes. */
34 void do_new_kmess(void);
35 void log_append(char *buf, int len);