5 #include <minix/gcov.h>
7 int gcov_flush_svr(char *buff
, int buff_sz
, int server_nr
)
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
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
35 return fread(ptr
, itemsize
, nitems
, stream
);
38 size_t _gcov_fwrite(void *ptr
, size_t itemsize
, size_t nitems
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
){