Stefan Schuermans commited on 2020-05-21 12:00:46
Showing 9 changed files, with 15 additions and 19 deletions.
... | ... |
@@ -14,9 +14,8 @@ |
14 | 14 |
* @return 0 on success (*data, *size set), |
15 | 15 |
* -1 on error (*data = NULL, *size = 0) |
16 | 16 |
*/ |
17 |
-int uptev_event_pack(struct _Uproctrace__Event *event, |
|
18 |
- void **data, size_t *size, |
|
19 |
- uptev_cleaner_t *cleaner) { |
|
17 |
+int uptev_event_pack(struct _Uproctrace__Event *event, void **data, |
|
18 |
+ size_t *size, uptev_cleaner_t *cleaner) { |
|
20 | 19 |
*size = uproctrace__event__get_packed_size(event); |
21 | 20 |
*data = malloc(*size); |
22 | 21 |
if (!data) { |
... | ... |
@@ -16,8 +16,7 @@ |
16 | 16 |
* @return 0 on success (*data, *size set), |
17 | 17 |
* -1 on error (*data = NULL, *size = 0) |
18 | 18 |
*/ |
19 |
-int uptev_event_pack(struct _Uproctrace__Event *event, |
|
20 |
- void **data, size_t *size, |
|
21 |
- uptev_cleaner_t *cleaner); |
|
19 |
+int uptev_event_pack(struct _Uproctrace__Event *event, void **data, |
|
20 |
+ size_t *size, uptev_cleaner_t *cleaner); |
|
22 | 21 |
|
23 | 22 |
#endif /* #ifndef UPTEV_EVENT_H */ |
... | ... |
@@ -1,11 +1,11 @@ |
1 |
-#include "stringlist.h" |
|
2 | 1 |
#include "cleaner.h" |
2 |
+#include "stringlist.h" |
|
3 | 3 |
|
4 | 4 |
#include <fcntl.h> |
5 | 5 |
#include <stdlib.h> |
6 | 6 |
#include <string.h> |
7 |
-#include <sys/types.h> |
|
8 | 7 |
#include <sys/stat.h> |
8 |
+#include <sys/types.h> |
|
9 | 9 |
#include <unistd.h> |
10 | 10 |
|
11 | 11 |
char *uptev_read_file(char const *pathname, size_t *size) { |
... | ... |
@@ -5,12 +5,11 @@ |
5 | 5 |
#include <fcntl.h> |
6 | 6 |
#include <stdlib.h> |
7 | 7 |
#include <string.h> |
8 |
-#include <sys/types.h> |
|
9 | 8 |
#include <sys/stat.h> |
9 |
+#include <sys/types.h> |
|
10 | 10 |
#include <unistd.h> |
11 | 11 |
|
12 |
-static char ** uptev_stringlist_make_ptrs(char *data, size_t sz, |
|
13 |
- size_t *cnt) { |
|
12 |
+static char **uptev_stringlist_make_ptrs(char *data, size_t sz, size_t *cnt) { |
|
14 | 13 |
/* count strings */ |
15 | 14 |
size_t pos = 0; |
16 | 15 |
*cnt = 0; |
... | ... |
@@ -17,7 +17,7 @@ void uptev_timing_get_timestamp(struct _Uproctrace__Timespec *timestamp) { |
17 | 17 |
uptev_timing_clock_gettime(CLOCK_REALTIME, timestamp); |
18 | 18 |
} |
19 | 19 |
|
20 |
-void uptev_timing_get_proc_cpu_time(struct _Uproctrace__Timespec |
|
21 |
- *proc_cpu_time) { |
|
20 |
+void uptev_timing_get_proc_cpu_time( |
|
21 |
+ struct _Uproctrace__Timespec *proc_cpu_time) { |
|
22 | 22 |
uptev_timing_clock_gettime(CLOCK_PROCESS_CPUTIME_ID, proc_cpu_time); |
23 | 23 |
} |
... | ... |
@@ -13,7 +13,7 @@ void uptev_timing_get_timestamp(struct _Uproctrace__Timespec *timestamp); |
13 | 13 |
* @brief fill timestamp with total CPU time used by process |
14 | 14 |
* @param[in,out] timestamp initialized structure to set to proccess CPU time |
15 | 15 |
*/ |
16 |
-void uptev_timing_get_proc_cpu_time(struct _Uproctrace__Timespec |
|
17 |
- *proc_cpu_time); |
|
16 |
+void uptev_timing_get_proc_cpu_time( |
|
17 |
+ struct _Uproctrace__Timespec *proc_cpu_time); |
|
18 | 18 |
|
19 | 19 |
#endif /* #ifndef UPTEV_TIMING_H */ |