summaryrefslogtreecommitdiffstats
path: root/tool/mbed/mbed-sdk/libraries/net/https/axTLS/ssl/os_port.h
diff options
context:
space:
mode:
authorJun Wako <wakojun@gmail.com>2015-04-24 09:26:14 +0200
committerJun Wako <wakojun@gmail.com>2015-04-24 09:26:14 +0200
commit1fe4406f374291ab2e86e95a97341fd9c475fcb8 (patch)
tree1be0e16b4b07b5a31ea97ec50a9eb13a288c3d27 /tool/mbed/mbed-sdk/libraries/net/https/axTLS/ssl/os_port.h
parenta20ef7052c6e937d2f7672dd59456e55a5c08296 (diff)
downloadqmk_firmware-1fe4406f374291ab2e86e95a97341fd9c475fcb8.tar.gz
qmk_firmware-1fe4406f374291ab2e86e95a97341fd9c475fcb8.tar.xz
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
b9e0ea0 Merge commit '7fa9d8bdea3773d1195b04d98fcf27cf48ddd81d' as 'tool/mbed/mbed-sdk' 7fa9d8b Squashed 'tool/mbed/mbed-sdk/' content from commit 7c21ce5 git-subtree-dir: tmk_core git-subtree-split: b9e0ea08cb940de20b3610ecdda18e9d8cd7c552
Diffstat (limited to 'tool/mbed/mbed-sdk/libraries/net/https/axTLS/ssl/os_port.h')
-rw-r--r--tool/mbed/mbed-sdk/libraries/net/https/axTLS/ssl/os_port.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/tool/mbed/mbed-sdk/libraries/net/https/axTLS/ssl/os_port.h b/tool/mbed/mbed-sdk/libraries/net/https/axTLS/ssl/os_port.h
new file mode 100644
index 000000000..3937261a7
--- /dev/null
+++ b/tool/mbed/mbed-sdk/libraries/net/https/axTLS/ssl/os_port.h
@@ -0,0 +1,45 @@
+#ifndef HEADER_OS_PORT_H
+#define HEADER_OS_PORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "config.h"
+
+//#include <Thread.h>
+#define SSL_CTX_MUTEX_TYPE //Mutex
+#define SSL_CTX_MUTEX_INIT(A) //pthread_mutex_init(&A, NULL)
+#define SSL_CTX_MUTEX_DESTROY(A) //pthread_mutex_destroy(&A)
+#define SSL_CTX_LOCK(A) //pthread_mutex_lock(&A)
+#define SSL_CTX_UNLOCK(A) //pthread_mutex_unlock(&A)
+
+#define malloc(A) ax_malloc(A, __FILE__, __LINE__)
+#ifndef realloc
+#define realloc(A,B) ax_realloc(A,B, __FILE__, __LINE__)
+#endif
+#define calloc(A,B) ax_calloc(A,B, __FILE__, __LINE__)
+#define free(A) ax_free(A, __FILE__, __LINE__)
+
+#define STDCALL
+#define EXP_FUNC
+void init_memory_buf(void);
+void disable_memory_buf(void);
+void enable_memory_buf(void);
+void print_buf_stats(void);
+void print_all_buf_stats(void);
+
+EXP_FUNC void * STDCALL ax_malloc(size_t s, const char* f, const int l);
+EXP_FUNC void * STDCALL ax_realloc(void *y, size_t s, const char* f, const int l);
+EXP_FUNC void * STDCALL ax_calloc(size_t n, size_t s, const char* f, const int l);
+EXP_FUNC void STDCALL ax_free(void *y, const char* f, const int l);
+
+//EXP_FUNC int STDCALL ax_open(const char *pathname, int flags);
+
+#define SOCKET_READ(A,B,C) lwip_read(A,B,C)
+#define SOCKET_WRITE(A,B,C) lwip_write(A,B,C)
+#define SOCKET_CLOSE(A) closesocket(A)
+#define TTY_FLUSH()
+#ifdef __cplusplus
+}
+#endif
+#endif