summaryrefslogtreecommitdiff
path: root/include/rune/core/thread.h
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2025-03-20 14:15:38 -0500
committerDanny Holman <dholman@gymli.org>2025-03-20 14:18:49 -0500
commitadaecb65eaa1abf437a24c93a08b2b7c2266c5dc (patch)
tree8b70c3f85648a12c6e6b7308489033653235aa64 /include/rune/core/thread.h
parent7281fe8fdbb64a83bc0f569ef01db33a1f26ac98 (diff)
core: refactor core API to be in proper style
Bring the rest of the core API to be in line with the project coding style. This commit also makes the coding style change formal by updating the coding style document in the documentation. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'include/rune/core/thread.h')
-rw-r--r--include/rune/core/thread.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/rune/core/thread.h b/include/rune/core/thread.h
index 976b7d3..a397b0c 100644
--- a/include/rune/core/thread.h
+++ b/include/rune/core/thread.h
@@ -28,21 +28,21 @@
/**
* Platform-agnostic thread handle
*/
-struct thread {
+typedef struct thread {
int ID; ///< In-engine thread ID
int detached; ///< 1 if thread has been detached, 0 otherwise
void *thread_handle; ///< System-defined thread handle, usually a pthread_t
struct list_head list; ///< Linked list of all threads, used internally
-};
+} thread_t;
/**
* Platform-agnostic mutex handle
*/
-struct mutex {
+typedef struct mutex {
int ID; ///< In-engine mutex ID
void *mutex_handle; ///< System-defined mutex handle, usually a pthread_mutex_t
struct list_head list; ///< Linked list of all mutexes, used internally
-};
+} mutex_t;
/**
* \brief Initializes the engine's thread API, must be called before using any