mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
linuxkm: tweak setup of wolfSSL_Mutex to assure complete type availability in applications (client modules).
This commit is contained in:
@@ -61,8 +61,6 @@
|
|||||||
|
|
||||||
#define WOLFSSL_KTHREADS
|
#define WOLFSSL_KTHREADS
|
||||||
|
|
||||||
typedef struct mutex wolfSSL_Mutex;
|
|
||||||
|
|
||||||
#ifdef BUILDING_WOLFSSL
|
#ifdef BUILDING_WOLFSSL
|
||||||
|
|
||||||
#if defined(CONFIG_MIPS) && defined(HAVE_LINUXKM_PIE_SUPPORT)
|
#if defined(CONFIG_MIPS) && defined(HAVE_LINUXKM_PIE_SUPPORT)
|
||||||
@@ -578,6 +576,13 @@
|
|||||||
|
|
||||||
#endif /* BUILDING_WOLFSSL */
|
#endif /* BUILDING_WOLFSSL */
|
||||||
|
|
||||||
|
/* if BUILDING_WOLFSSL, mutex.h will have already been included recursively
|
||||||
|
* above, with the bevy of warnings suppressed, and the below include will
|
||||||
|
* be a redundant no-op.
|
||||||
|
*/
|
||||||
|
#include <linux/mutex.h>
|
||||||
|
typedef struct mutex wolfSSL_Mutex;
|
||||||
|
|
||||||
#define XMALLOC(s, h, t) ({(void)(h); (void)(t); kmalloc(s, GFP_KERNEL);})
|
#define XMALLOC(s, h, t) ({(void)(h); (void)(t); kmalloc(s, GFP_KERNEL);})
|
||||||
#define XFREE(p, h, t) ({void* _xp; (void)(h); _xp = (p); if(_xp) kfree(_xp);})
|
#define XFREE(p, h, t) ({void* _xp; (void)(h); _xp = (p); if(_xp) kfree(_xp);})
|
||||||
#define XREALLOC(p, n, h, t) ({(void)(h); (void)(t); krealloc((p), (n), GFP_KERNEL);})
|
#define XREALLOC(p, n, h, t) ({(void)(h); (void)(t); krealloc((p), (n), GFP_KERNEL);})
|
||||||
|
@@ -219,8 +219,6 @@
|
|||||||
typedef CRITICAL_SECTION wolfSSL_Mutex;
|
typedef CRITICAL_SECTION wolfSSL_Mutex;
|
||||||
#elif defined(WOLFSSL_PTHREADS)
|
#elif defined(WOLFSSL_PTHREADS)
|
||||||
typedef pthread_mutex_t wolfSSL_Mutex;
|
typedef pthread_mutex_t wolfSSL_Mutex;
|
||||||
#elif defined(WOLFSSL_KTHREADS)
|
|
||||||
typedef struct mutex wolfSSL_Mutex;
|
|
||||||
#elif defined(THREADX)
|
#elif defined(THREADX)
|
||||||
typedef TX_MUTEX wolfSSL_Mutex;
|
typedef TX_MUTEX wolfSSL_Mutex;
|
||||||
#elif defined(WOLFSSL_DEOS)
|
#elif defined(WOLFSSL_DEOS)
|
||||||
|
Reference in New Issue
Block a user