Add a stub pthread header.

The header implements only the pthread rwlock interface, which
never actually locks.

This is necessary to build libunwind.
This commit is contained in:
whitequark 2015-07-26 12:54:40 +03:00
parent b5048f6cf1
commit b2710e437c
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#ifndef __PTHREAD_H
#define __PTHREAD_H
typedef int pthread_rwlock_t;
#define PTHREAD_RWLOCK_INITIALIZER 0
#ifdef __cplusplus
extern "C" {
#endif
inline int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
{ return 0; }
inline int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock)
{ return 0; }
inline int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock)
{ return 0; }
inline int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock)
{ return 0; }
int pthread_rwlock_unlock(pthread_rwlock_t *rwlock)
{ return 0; }
#ifdef __cplusplus
}
#endif
#endif /* __PTHREAD_H */