summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/auxiliary/util/u_range.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-08-14 09:45:54 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-08-14 09:45:54 +0000
commit4c58069f5013f0a621503525f7d5193bfe9976b3 (patch)
treebd8f8a08b889e9a8b99c9de01ae12459d527ea6d /lib/mesa/src/gallium/auxiliary/util/u_range.h
parent5caa025e6b62d0456faad86c89f239a14d1eaadb (diff)
Import Mesa 17.1.6
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary/util/u_range.h')
-rw-r--r--lib/mesa/src/gallium/auxiliary/util/u_range.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/util/u_range.h b/lib/mesa/src/gallium/auxiliary/util/u_range.h
index a1da5e5a6..7d3fc61aa 100644
--- a/lib/mesa/src/gallium/auxiliary/util/u_range.h
+++ b/lib/mesa/src/gallium/auxiliary/util/u_range.h
@@ -43,7 +43,7 @@ struct util_range {
unsigned end; /* exclusive */
/* for the range to be consistent with multiple contexts: */
- pipe_mutex write_mutex;
+ mtx_t write_mutex;
};
@@ -59,10 +59,10 @@ static inline void
util_range_add(struct util_range *range, unsigned start, unsigned end)
{
if (start < range->start || end > range->end) {
- pipe_mutex_lock(range->write_mutex);
+ mtx_lock(&range->write_mutex);
range->start = MIN2(start, range->start);
range->end = MAX2(end, range->end);
- pipe_mutex_unlock(range->write_mutex);
+ mtx_unlock(&range->write_mutex);
}
}
@@ -78,14 +78,14 @@ util_ranges_intersect(struct util_range *range, unsigned start, unsigned end)
static inline void
util_range_init(struct util_range *range)
{
- pipe_mutex_init(range->write_mutex);
+ (void) mtx_init(&range->write_mutex, mtx_plain);
util_range_set_empty(range);
}
static inline void
util_range_destroy(struct util_range *range)
{
- pipe_mutex_destroy(range->write_mutex);
+ mtx_destroy(&range->write_mutex);
}
#endif