summaryrefslogtreecommitdiff
path: root/kernel/halts.h
blob: bd71673e2ffbd84924858e050fa38fb6774f057e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef HALTS_H
#define HALTS_H
#include <fs/vfs.h>
#include <stdint.h>

typedef struct {
  uint8_t *ptr;
  uint8_t active;
} halt_t;

int create_read_fdhalt(vfs_fd_t *fd);
int create_read_inode_halt(vfs_inode_t *inode);
void unset_read_fdhalt(int i);
int create_write_fdhalt(vfs_fd_t *fd);
int create_write_inode_halt(vfs_inode_t *inode);
void unset_write_fdhalt(int i);
int create_disconnect_fdhalt(vfs_fd_t *fd);
void unset_disconnect_fdhalt(int i);
int isset_fdhalt(vfs_inode_t *read_halts[], vfs_inode_t *write_halts[],
                 vfs_inode_t *disconnect_halts[]);
#endif