xref: /minix3/minix/fs/procfs/proto.h (revision 305e366fe47197851cc728bd12ee4d4f1d8f7d64)
1433d6423SLionel Sambuc #ifndef _PROCFS_PROTO_H
2433d6423SLionel Sambuc #define _PROCFS_PROTO_H
3433d6423SLionel Sambuc 
4433d6423SLionel Sambuc /* buf.c */
55eefd0feSDavid van Moolenbroek void buf_init(char *ptr, size_t len, off_t start);
6f1abbce7SDavid van Moolenbroek void buf_printf(char *fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
7433d6423SLionel Sambuc void buf_append(char *data, size_t len);
85eefd0feSDavid van Moolenbroek ssize_t buf_result(void);
9433d6423SLionel Sambuc 
10f1abbce7SDavid van Moolenbroek /* cpuinfo.c */
11f1abbce7SDavid van Moolenbroek void root_cpuinfo(void);
12f1abbce7SDavid van Moolenbroek 
1331b6611aSDavid van Moolenbroek /* service.c */
1431b6611aSDavid van Moolenbroek void service_init(void);
1531b6611aSDavid van Moolenbroek void service_lookup(struct inode *parent, clock_t now);
1631b6611aSDavid van Moolenbroek void service_getdents(struct inode *node);
1731b6611aSDavid van Moolenbroek void service_read(struct inode *node);
1831b6611aSDavid van Moolenbroek 
19433d6423SLionel Sambuc /* tree.c */
20433d6423SLionel Sambuc int init_tree(void);
21433d6423SLionel Sambuc int lookup_hook(struct inode *parent, char *name, cbdata_t cbdata);
22433d6423SLionel Sambuc int getdents_hook(struct inode *inode, cbdata_t cbdata);
235eefd0feSDavid van Moolenbroek ssize_t read_hook(struct inode *inode, char *ptr, size_t len, off_t off,
245eefd0feSDavid van Moolenbroek 	cbdata_t cbdata);
255eefd0feSDavid van Moolenbroek int rdlink_hook(struct inode *inode, char *ptr, size_t max, cbdata_t cbdata);
26*305e366fSDavid van Moolenbroek pid_t pid_from_slot(int slot);
2731b6611aSDavid van Moolenbroek void out_of_inodes(void);
28433d6423SLionel Sambuc 
29433d6423SLionel Sambuc /* util.c */
30433d6423SLionel Sambuc int procfs_getloadavg(struct load *loadavg, int nelem);
31433d6423SLionel Sambuc 
32433d6423SLionel Sambuc #endif /* _PROCFS_PROTO_H */
33