/* Creating and controlling threads.
- Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ Copyright (C) 2005-2014 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdlib.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GLTHREAD_THREAD_INLINE
+# define _GLTHREAD_THREAD_INLINE _GL_INLINE
+#endif
+
/* ========================================================================= */
#if USE_POSIX_THREADS
address of a function in libpthread that we don't use. */
# pragma weak pthread_create
+
+# ifdef __clang__
+ /* Without this, clang complains that pthread_sigmask is never declared. */
+# include <signal.h>
+# endif
# pragma weak pthread_sigmask
+
# pragma weak pthread_join
# ifndef pthread_self
# pragma weak pthread_self
extern "C" {
#endif
-static inline gl_thread_t
+_GLTHREAD_THREAD_INLINE gl_thread_t
gl_thread_create (void *(*func) (void *arg), void *arg)
{
gl_thread_t thread;
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _GLTHREAD_THREAD_H */