Project

General

Profile

Statistics
| Revision:

root / lab4 / .minix-src / include / lib.h @ 14

History | View | Annotate | Download (1.57 KB)

1 13 up20180614
/* The <lib.h> header is the master header used by the library.
2
 * All the C files in the lib subdirectories include it.
3
 */
4
5
#ifndef _LIB_H
6
#define _LIB_H
7
8
/* First come the defines. */
9
#include <sys/featuretest.h>        /* tell headers to include NetBSD stuff. */
10
11
/* The following are so basic, all the lib files get them automatically. */
12
#include <minix/config.h>        /* must be first */
13
#include <sys/types.h>
14
#include <sys/uio.h>
15
#include <limits.h>
16
#include <errno.h>
17
18
#include <minix/const.h>
19
#include <minix/com.h>
20
#include <minix/type.h>
21
#include <minix/callnr.h>
22
#include <minix/endpoint.h>
23
#include <minix/ipc.h>
24
25
struct minix_kerninfo *get_minix_kerninfo(void);
26
27
vir_bytes minix_get_user_sp(void);
28
29
struct ps_strings; /* forward declaration for minix_stack_fill. */
30
31
void minix_stack_params(const char *path, char * const *argv,
32
        char * const *envp, size_t *stack_size, char *overflow, int *argc,
33
        int *envc);
34
void minix_stack_fill(const char *path, int argc, char * const *argv,
35
        int envc, char * const *envp, size_t stack_size, char *frame,
36
        int *vsp, struct ps_strings **psp);
37
38
int __execve(const char *_path, char *const _argv[], char *const
39
        _envp[], int _nargs, int _nenvps);
40
int _syscall(endpoint_t _who, int _syscallnr, message *_msgptr);
41
void _loadname(const char *_name, message *_msgptr);
42
int _len(const char *_s);
43
void _begsig(int _dummy);
44
45
#define _VECTORIO_READ        1
46
#define _VECTORIO_WRITE        2
47
ssize_t _vectorio_setup(const struct iovec * iov, int iovcnt, char ** ptr,
48
        int op);
49
void _vectorio_cleanup(const struct iovec * iov, int iovcnt, char * buffer,
50
        ssize_t r, int op);
51
52
#endif /* _LIB_H */