diff options
author | Timothy Arceri <[email protected]> | 2017-03-09 09:57:58 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-12 17:49:04 +1100 |
commit | f8cc4c25b8985e7f834510ca9d34eec308f413e3 (patch) | |
tree | 0f5b2f65c8b81681eeb5e85f4cf87af6f66d0b59 /src/gallium/auxiliary | |
parent | b822d9dd67b502565b30da37b90c1d70114b8409 (diff) |
gallium/util: replace pipe_thread_create() with u_thread_create()
They do the same thing we just moved the function to be
accessible to all of Mesa.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/os/os_thread.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 22921231c5d..468fbfe2f92 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -39,34 +39,8 @@ #include "pipe/p_compiler.h" #include "util/u_debug.h" /* for assert */ +#include "util/u_thread.h" -#include "c11/threads.h" - -#ifdef HAVE_PTHREAD -#include <signal.h> -#endif - - -static inline thrd_t pipe_thread_create(int (*routine)(void *), void *param) -{ - thrd_t thread; -#ifdef HAVE_PTHREAD - sigset_t saved_set, new_set; - int ret; - - sigfillset(&new_set); - pthread_sigmask(SIG_SETMASK, &new_set, &saved_set); - ret = thrd_create( &thread, routine, param ); - pthread_sigmask(SIG_SETMASK, &saved_set, NULL); -#else - int ret; - ret = thrd_create( &thread, routine, param ); -#endif - if (ret) - return 0; - - return thread; -} static inline void pipe_thread_setname( const char *name ) { |