summaryrefslogtreecommitdiff
path: root/src/util/thread.h
diff options
context:
space:
mode:
author2lag <96544487+2lag@users.noreply.github.com>2026-08-08 17:33:36 +0200
committer2lag <96544487+2lag@users.noreply.github.com>2026-08-08 17:33:36 +0200
commit2973df584978d9aae6f164ce0204179c8a28b3ae (patch)
treec1b793c8e0d17aeb66c5197bc28acca84b2c98ab /src/util/thread.h
parente540910745aad31378452eec25aacfb3f346191a (diff)
console, textbox changes, some other shit
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;