summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/os
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-05 12:32:01 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:48:11 +1100
commit2efddc63ee864ab917e444b68a7c2dcf520d451e (patch)
treec5b3e14ccdf933775310fe593f6c14baf2b88f7b /src/gallium/auxiliary/os
parent464d4806c112c6d224a55b328cde327a025acd91 (diff)
gallium/util: replace pipe_mutex with mtx_t
pipe_mutex was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/os')
-rw-r--r--src/gallium/auxiliary/os/os_thread.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index 6eca2ca2c7a..af350b878ab 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -108,12 +108,8 @@ static inline int pipe_thread_is_self( pipe_thread thread )
return 0;
}
-/* pipe_mutex
- */
-typedef mtx_t pipe_mutex;
-
#define pipe_static_mutex(mutex) \
- static pipe_mutex mutex = _MTX_INITIALIZER_NP
+ static mtx_t mutex = _MTX_INITIALIZER_NP
#define pipe_mutex_init(mutex) \
(void) mtx_init(&(mutex), mtx_plain)
@@ -131,11 +127,11 @@ typedef mtx_t pipe_mutex;
__pipe_mutex_assert_locked(&(mutex))
static inline void
-__pipe_mutex_assert_locked(pipe_mutex *mutex)
+__pipe_mutex_assert_locked(mtx_t *mutex)
{
#ifdef DEBUG
/* NOTE: this would not work for recursive mutexes, but
- * pipe_mutex doesn't support those
+ * mtx_t doesn't support those
*/
int ret = mtx_trylock(mutex);
assert(ret == thrd_busy);
@@ -179,7 +175,7 @@ typedef struct {
unsigned count;
unsigned waiters;
uint64_t sequence;
- pipe_mutex mutex;
+ mtx_t mutex;
pipe_condvar condvar;
} pipe_barrier;
@@ -231,7 +227,7 @@ static inline void pipe_barrier_wait(pipe_barrier *barrier)
typedef struct
{
- pipe_mutex mutex;
+ mtx_t mutex;
pipe_condvar cond;
int counter;
} pipe_semaphore;