1 #ifndef HEADER_OS_PORT_H
2 #define HEADER_OS_PORT_H
10 #define SSL_CTX_MUTEX_TYPE //Mutex
11 #define SSL_CTX_MUTEX_INIT(A) //pthread_mutex_init(&A, NULL)
12 #define SSL_CTX_MUTEX_DESTROY(A) //pthread_mutex_destroy(&A)
13 #define SSL_CTX_LOCK(A) //pthread_mutex_lock(&A)
14 #define SSL_CTX_UNLOCK(A) //pthread_mutex_unlock(&A)
16 #define malloc(A) ax_malloc(A, __FILE__, __LINE__)
18 #define realloc(A,B) ax_realloc(A,B, __FILE__, __LINE__)
20 #define calloc(A,B) ax_calloc(A,B, __FILE__, __LINE__)
21 #define free(A) ax_free(A, __FILE__, __LINE__)
25 void init_memory_buf(void);
26 void disable_memory_buf(void);
27 void enable_memory_buf(void);
28 void print_buf_stats(void);
29 void print_all_buf_stats(void);
31 EXP_FUNC void * STDCALL ax_malloc(size_t s, const char* f, const int l);
32 EXP_FUNC void * STDCALL ax_realloc(void *y, size_t s, const char* f, const int l);
33 EXP_FUNC void * STDCALL ax_calloc(size_t n, size_t s, const char* f, const int l);
34 EXP_FUNC void STDCALL ax_free(void *y, const char* f, const int l);
36 //EXP_FUNC int STDCALL ax_open(const char *pathname, int flags);
38 #define SOCKET_READ(A,B,C) lwip_read(A,B,C)
39 #define SOCKET_WRITE(A,B,C) lwip_write(A,B,C)
40 #define SOCKET_CLOSE(A) closesocket(A)