]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/net/https/axTLS/ssl/os_port.h
Merge commit 'fdc38ef3f92af7adeeb4de49550d8838c8a39b5c'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / net / https / axTLS / ssl / os_port.h
1 #ifndef HEADER_OS_PORT_H
2 #define HEADER_OS_PORT_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 #include "config.h"
8
9 //#include <Thread.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)
15
16 #define malloc(A) ax_malloc(A, __FILE__, __LINE__)
17 #ifndef realloc
18 #define realloc(A,B) ax_realloc(A,B, __FILE__, __LINE__)
19 #endif
20 #define calloc(A,B) ax_calloc(A,B, __FILE__, __LINE__)
21 #define free(A) ax_free(A, __FILE__, __LINE__)
22
23 #define STDCALL
24 #define EXP_FUNC
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);
30
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);
35
36 //EXP_FUNC int STDCALL ax_open(const char *pathname, int flags);
37
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)
41 #define TTY_FLUSH()
42 #ifdef __cplusplus
43 }
44 #endif
45 #endif
Imprint / Impressum