aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@google.com>2020-04-05 22:09:58 -0700
committerMarat Dukhan <maratek@google.com>2020-04-05 22:09:58 -0700
commitfa67ff531c0f9999c742d500a4fa061b96937297 (patch)
tree83ce61571d9dc632f1d477c0e1e7cffb5b8d7565 /src
parent4694c12cac1833653ceb80de5c0564f24cd412be (diff)
downloadpthreadpool-fa67ff531c0f9999c742d500a4fa061b96937297.tar.gz
Fix erroneous narrowing in pthreadpool_fetch_sub_relaxed_size_t
Diffstat (limited to 'src')
-rw-r--r--src/threadpool-atomics.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/threadpool-atomics.h b/src/threadpool-atomics.h
index 28c10e3..4e48da7 100644
--- a/src/threadpool-atomics.h
+++ b/src/threadpool-atomics.h
@@ -69,9 +69,9 @@
__c11_atomic_store(address, value, __ATOMIC_RELEASE);
}
- static inline uint32_t pthreadpool_fetch_sub_relaxed_size_t(
+ static inline size_t pthreadpool_fetch_sub_relaxed_size_t(
pthreadpool_atomic_size_t* address,
- uint32_t decrement)
+ size_t decrement)
{
return __c11_atomic_fetch_sub(address, decrement, __ATOMIC_RELAXED);
}
@@ -152,9 +152,9 @@
atomic_store_explicit(address, value, memory_order_release);
}
- static inline uint32_t pthreadpool_fetch_sub_relaxed_size_t(
+ static inline size_t pthreadpool_fetch_sub_relaxed_size_t(
pthreadpool_atomic_size_t* address,
- uint32_t decrement)
+ size_t decrement)
{
return atomic_fetch_sub_explicit(address, decrement, memory_order_relaxed);
}