summaryrefslogtreecommitdiff
path: root/src/util/thread.h
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-08-11 19:10:16 +0200
committeraura <nw@moneybot.cc>2026-08-11 19:10:16 +0200
commit17c07b5f884453130d8be3a6d91d730d80d4f8ae (patch)
tree6ec11e5e5f7f0be9ed899196c2897aa76a907de2 /src/util/thread.h
parent1aa17de9188790f049c0edc4281597cb4e535627 (diff)
parent0a9d7ce6a0764a87766ebb23cc1ece4c26c8c678 (diff)
Merge remote-tracking branch 'origin/day'
Diffstat (limited to 'src/util/thread.h')
-rw-r--r--src/util/thread.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/thread.h b/src/util/thread.h
index 72ef5fb..b46ade0 100644
--- a/src/util/thread.h
+++ b/src/util/thread.h
@@ -544,13 +544,13 @@ get the count, it might have changed by another thread calling consume or produc
union thread_mutex_t
{
void* align;
- char data[ 64 ];
+ char data[64];
};
union thread_signal_t
{
void* align;
- char data[ 116 ];
+ char data[116];
};
union thread_atomic_int_t
@@ -567,7 +567,7 @@ union thread_atomic_ptr_t
union thread_timer_t
{
void* data;
- char d[ 8 ];
+ char d[8];
};
struct thread_queue_t
@@ -1418,7 +1418,7 @@ int thread_queue_produce( thread_queue_t* queue, void* value, int timeout_ms )
return 0;
}
int tail = thread_atomic_int_inc( &queue->tail );
- queue->values[ tail % queue->size ] = value;
+ queue->values[tail % queue->size] = value;
if( thread_atomic_int_inc( &queue->count ) == 0 )
thread_signal_raise( &queue->data_ready );
return 1;
@@ -1439,7 +1439,7 @@ void* thread_queue_consume( thread_queue_t* queue, int timeout_ms )
return NULL;
}
int head = thread_atomic_int_inc( &queue->head );
- void* retval = queue->values[ head % queue->size ];
+ void* retval = queue->values[head % queue->size];
if( thread_atomic_int_dec( &queue->count ) == queue->size )
thread_signal_raise( &queue->space_open );
return retval;