From 6972cb5388cb907e0a82444f0c46e761118d7506 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 14 Aug 2021 13:54:10 +1000 Subject: [PATCH] Mark some variables as atomic. --- miniaudio.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index e0452e1a..c5864c28 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -7836,12 +7836,12 @@ MA_API ma_resource_manager_job_queue_config ma_resource_manager_job_queue_config typedef struct { - ma_uint32 flags; /* Flags passed in at initialization time. */ - ma_uint32 capacity; /* The maximum number of jobs that can fit in the queue at a time. Set by the config. */ - ma_uint64 head; /* The first item in the list. Required for removing from the top of the list. */ - ma_uint64 tail; /* The last item in the list. Required for appending to the end of the list. */ + ma_uint32 flags; /* Flags passed in at initialization time. */ + ma_uint32 capacity; /* The maximum number of jobs that can fit in the queue at a time. Set by the config. */ + MA_ATOMIC ma_uint64 head; /* The first item in the list. Required for removing from the top of the list. */ + MA_ATOMIC ma_uint64 tail; /* The last item in the list. Required for appending to the end of the list. */ #ifndef MA_NO_THREADING - ma_semaphore sem; /* Only used when MA_RESOURCE_MANAGER_JOB_QUEUE_FLAG_NON_BLOCKING is unset. */ + ma_semaphore sem; /* Only used when MA_RESOURCE_MANAGER_JOB_QUEUE_FLAG_NON_BLOCKING is unset. */ #endif ma_slot_allocator allocator; ma_resource_manager_job* pJobs;