diff options
author | Adeel Mujahid <3840695+am11@users.noreply.github.com> | 2022-06-29 02:43:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 19:43:45 -0400 |
commit | cfcf3d193a4425f58ed9556ec54b6d7ab0557330 (patch) | |
tree | 04da0e1e3fe3dc3fbdb55f53b0fabbf01e033d82 /include/remote/win/pthread.h | |
parent | 9c7245b97d515c9bdb9f8b63dc1d4e35e2fafa56 (diff) | |
download | libunwind-cfcf3d193a4425f58ed9556ec54b6d7ab0557330.tar.gz |
Add remote unwinding support for macOS (#365)
* Add remote unwinding support for macOS
* Fix broken Win build by bumping minimum language requirement to C11
* Update license headers
* Rename remote_unwind to remote
* Revert Gparser.c
Diffstat (limited to 'include/remote/win/pthread.h')
-rw-r--r-- | include/remote/win/pthread.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/remote/win/pthread.h b/include/remote/win/pthread.h new file mode 100644 index 00000000..8a0b0a18 --- /dev/null +++ b/include/remote/win/pthread.h @@ -0,0 +1,30 @@ +// This is an incomplete & imprecice implementation of the Posix +// standard file by the same name + + +// Since this is only intended for VC++ compilers +// use #pragma once instead of guard macros +#pragma once + +#ifdef _MSC_VER // Only for cross compilation to windows + +// #include <sched.h> +#include <sys/types.h> + +#define PTHREAD_DESTRUCTOR_ITERATIONS 0 +#define PTHREAD_MUTEX_INITIALIZER 0 +#define PTHREAD_ONCE_INIT 0 + +typedef long pthread_key_t; +typedef long pthread_mutex_t; +typedef long pthread_mutexattr_t; +typedef long pthread_once_t; + +int pthread_key_create(pthread_key_t *, void (*)(void*)); +int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *); +int pthread_mutex_lock(pthread_mutex_t *); +int pthread_mutex_unlock(pthread_mutex_t *); +int pthread_once(pthread_once_t *, void (*)(void)); +int pthread_setspecific(pthread_key_t, const void *); + +#endif // _MSC_VER |