Remove threading
[middleman.git] / include / compat.h
index b2bedba..f7d3608 100644 (file)
@@ -1,15 +1,21 @@
 #ifndef COMPAT_H
 #define COMPAT_H
 
-#ifndef HAVE_PTHREAD_RWLOCK_INIT
-/* pthread rwlock's aren't very portable, these will replace them with a slower alternative */
-#define pthread_rwlock_t pthread_mutex_t
-#define pthread_rwlock_init pthread_mutex_init
-#define pthread_rwlock_destroy pthread_mutex_destroy
-#define pthread_rwlock_rdlock pthread_mutex_lock
-#define pthread_rwlock_wrlock pthread_mutex_lock
-#define pthread_rwlock_unlock pthread_mutex_unlock
-#endif /* HAVE_PTHREAD_RWLOCK_INIT */
+#define pthread_mutex_t int
+#define PTHREAD_MUTEX_INITIALIZER 0
+#define pthread_attr_init(attr)
+#define pthread_attr_destroy(attr)
+#define pthread_attr_setdetachstate(attr,state)
+#define pthread_attr_setschedpolicy(attr,policy)
+#define pthread_mutex_init(mutex,attr)
+#define pthread_mutex_lock(mutex)
+#define pthread_mutex_unlock(mutex)
+#define pthread_rwlock_init(lock,attr)
+#define pthread_rwlock_destroy(lock)
+#define pthread_rwlock_rdlock(lock)
+#define pthread_rwlock_wrlock(lock)
+#define pthread_rwlock_unlock(lock)
+/* pthread_create(thread,attr,start_routine,arg) not ignorable */
 
 #ifndef HAVE_POLL