Arm MAP Metric Plugin Interface
Metric Plugin Interface for MAP
allinea_safe_syscalls.h
Go to the documentation of this file.
1 
5 #ifndef ALLINEA_SAFE_SYSCALLS_H
6 #define ALLINEA_SAFE_SYSCALLS_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include <stdarg.h>
13 #include <stdlib.h>
14 #include <stddef.h>
15 
27 
33 struct timespec allinea_get_current_time(void);
34 
35 
37 
44 extern int allinea_safe_close(int fd);
45 
46 
48 
53 extern void allinea_safe_fprintf(int fd, const char *format, ...);
54 
55 
57 
67 extern int allinea_safe_open (const char *file, int oflags, ...);
68 
69 
71 
75 extern void allinea_safe_printf(const char *format, ...);
76 
77 
79 
88 extern ssize_t allinea_safe_read(int fd, void *buf, size_t count);
89 
90 
92 
101 extern ssize_t allinea_safe_read_all(int fd, void *buf, size_t count);
102 
103 
105 
115 extern ssize_t allinea_safe_read_all_with_alloc(int fd, void **buf, size_t *count);
116 
117 
132 extern ssize_t allinea_safe_read_line(int fd, void *buf, size_t count);
133 
134 
136 
141 extern void allinea_safe_vfprintf(int fd, const char *format, va_list ap);
142 
143 
145 
154 extern ssize_t allinea_safe_write(int fd, const void *buf, size_t count);
155 
156 
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif
void allinea_safe_vfprintf(int fd, const char *format, va_list ap)
An async-signal-safe version of vfprintf.
ssize_t allinea_safe_read_all_with_alloc(int fd, void **buf, size_t *count)
Reads the entire contents of fd into buf (async-signal-safe).
void allinea_safe_fprintf(int fd, const char *format,...)
An async-signal-safe version of fprintf.
ssize_t allinea_safe_read_all(int fd, void *buf, size_t count)
Reads the entire contents of fd into buf (async-signal-safe).
void allinea_safe_printf(const char *format,...)
An async-signal-safe replacement for printf.
ssize_t allinea_safe_read_line(int fd, void *buf, size_t count)
Reads a line from fd into buf (async-signal-safe).
ssize_t allinea_safe_read(int fd, void *buf, size_t count)
Reads up to count bytes from buf to fd (async-signal-safe)
int allinea_safe_open(const char *file, int oflags,...)
Opens the given file for reading or writing (async-signal-safe).
int allinea_safe_close(int fd)
Closes the file descriptor fd previously opened by allinea_safe_open (async-signal-safe).
ssize_t allinea_safe_write(int fd, const void *buf, size_t count)
Writes up to count bytes from buf to fd (async-signal-safe).
struct timespec allinea_get_current_time(void)
Gets the current time using the same clock as the enclosing profiler (async-signal-safe).