summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-10-14 21:08:29 -0500
committerDanny Holman <dholman@gymli.org>2024-10-14 21:08:29 -0500
commit4e9832e0ad2fc30bce7d0bdc71990d1aefffd8c9 (patch)
tree0fe81dfe3a1a1d1b95ee585747bd57af07a50511
parent4248f000f200c0a078496733b65cf61a525c356b (diff)
core: thread: make helper functions static
Make the helper functions for the thread API static so that they aren't usable outside the thread API's translation unit. Signed-off-by: Danny Holman <dholman@gymli.org>
-rw-r--r--core/thread.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/thread.c b/core/thread.c
index 59f50b5..ae0ec18 100644
--- a/core/thread.c
+++ b/core/thread.c
@@ -16,7 +16,7 @@ struct start_args {
void *thread_args;
};
-struct thread* _find_thread_by_handle(void *handle) {
+static struct thread* _find_thread_by_handle(void *handle) {
if (threads == NULL)
return NULL;
@@ -31,7 +31,7 @@ struct thread* _find_thread_by_handle(void *handle) {
return NULL;
}
-struct thread* _find_thread_by_id(int ID) {
+static struct thread* _find_thread_by_id(int ID) {
if (threads == NULL)
return NULL;
@@ -46,7 +46,7 @@ struct thread* _find_thread_by_id(int ID) {
return NULL;
}
-struct mutex* _find_mutex_by_id(int ID) {
+static struct mutex* _find_mutex_by_id(int ID) {
if (mutexes == NULL)
return NULL;
@@ -62,14 +62,14 @@ struct mutex* _find_mutex_by_id(int ID) {
}
-void _cleanup_pthread(void *arg) {
+static void _cleanup_pthread(void *arg) {
struct thread *thread = (struct thread*)arg;
list_del(&thread->list);
rune_free(thread->thread_handle);
rune_free(thread);
}
-void* _startup_pthread(void *arg) {
+static void* _startup_pthread(void *arg) {
struct start_args *start_args = (struct start_args*)arg;
void* (*thread_fn)(void *data) = start_args->thread_fn;