VM: simplify slab allocator
[minix.git] / lib / libminlib / gcov.c
blob5ce8a39968d52bc496f6d478bc1ec163552f1ac5
1 #include <sys/types.h>
2 #include <stdio.h>
3 #include <stdlib.h>
5 #include <minix/gcov.h>
7 int gcov_flush_svr(char *buff, int buff_sz, int server_nr)
9 message msg;
11 msg.GCOV_BUFF_P = buff;
12 msg.GCOV_BUFF_SZ = buff_sz;
13 msg.GCOV_PID = server_nr;
15 /* Make the call to server. It will call the gcov library,
16 * buffer the stdio requests, and copy the buffer to this user
17 * space
19 return _syscall(VFS_PROC_NR, GCOV_FLUSH, &msg);
23 /* wrappers for file system calls from gcc libgcov library.
24 Default calls are wrapped. In libsys, an alternative
25 implementation for servers is used.
28 FILE *_gcov_fopen(char *name, char *mode){
29 return fopen(name, mode);
33 size_t _gcov_fread(void *ptr, size_t itemsize, size_t nitems
34 , FILE *stream){
35 return fread(ptr, itemsize, nitems, stream);
38 size_t _gcov_fwrite(void *ptr, size_t itemsize, size_t nitems
39 , FILE *stream){
40 return fwrite(ptr, itemsize, nitems, stream);
43 int _gcov_fclose(FILE *stream){
44 return fclose(stream);
47 int _gcov_fseek(FILE *stream, long offset, int ptrname){
48 return fseek(stream, offset, ptrname);
51 char *_gcov_getenv(const char *name){
52 return getenv(name);