1 /*
2  * Copyright 2018 Oticon A/S
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef _BS_UTIL_OSWRAP_H
8 #define _BS_UTIL_OSWRAP_H
9 
10 #include <stdlib.h>
11 #include <stdio.h>
12 #include "bs_types.h"
13 #include "bs_string.h"
14 
15 #ifdef __cplusplus
16 extern "C"{
17 #endif
18 
19 void bs_set_sig_term_handler(void (*f)(int), int signals[], int n);
20 #if defined(__linux)
21 uint64_t bs_get_process_start_time(long int pid);
22 #endif
23 void* bs_malloc(size_t size);
24 void* bs_aligned_alloc(size_t alignment, size_t size);
25 void* bs_calloc(size_t nmemb, size_t size);
26 void* bs_realloc(void *ptr, size_t size);
27 void bs_skipline(FILE *file);
28 void bs_readline(char *s, int size, FILE *stream);
29 int bs_createfolder(const char* folderpath);
30 FILE* bs_fopen(const char *file_path, const char *open_type);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif
37