From b70ee2d35963296ab84559afe1a0ce69a9c865df Mon Sep 17 00:00:00 2001 From: Mikhail Romanko Date: Tue, 22 Sep 2026 18:41:11 +0300 Subject: [PATCH] Fix naming --- CgeThread.h | 8 ++++---- posix/Thread.c | 10 +++++----- posix/Tss.c | 2 +- win32/Thread.c | 10 +++++----- win32/Tss.c | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CgeThread.h b/CgeThread.h index 40b4b4d..c937238 100644 --- a/CgeThread.h +++ b/CgeThread.h @@ -22,10 +22,10 @@ typedef struct CgeMutex CgeMutex; typedef struct CgeSemaphore CgeSemaphore; typedef struct CgeCondition CgeCondition; typedef struct CgeTss CgeTss; -typedef int (*CgeThreadCallback)(void *); -typedef void (*CgeTssCallback)(void *); +typedef int (*CgeThreadCb)(void *); +typedef void (*CgeTssCb)(void *); -CgeThread *CgeThreadNew(size_t stack, CgeThreadCallback callback, void *data, +CgeThread *CgeThreadNew(size_t stack, CgeThreadCb callback, void *data, int *result); int CgeThreadJoin(CgeThread *thread, int *result); int CgeThreadDetach(CgeThread *thread, int *result); @@ -52,7 +52,7 @@ int CgeConditionWaitFor(CgeCondition *condition, CgeMutex *mutex, int CgeConditionSignal(CgeCondition *condition, int *result); int CgeConditionBroadcast(CgeCondition *condition, int *result); -CgeTss *CgeTssNew(CgeTssCallback callback, int *result); +CgeTss *CgeTssNew(CgeTssCb callback, int *result); void CgeTssFree(CgeTss *tss); void *CgeTssRead(CgeTss *tss); void CgeTssWrite(CgeTss *tss, void *value); diff --git a/posix/Thread.c b/posix/Thread.c index 90411a2..6a3c0a8 100644 --- a/posix/Thread.c +++ b/posix/Thread.c @@ -5,12 +5,12 @@ #include struct CgeThreadContext { - CgeThreadCallback callback; + CgeThreadCb callback; void *data; }; static void *threadRun(void *context) { - CgeThreadCallback callback; + CgeThreadCb callback; void *data; callback = ((struct CgeThreadContext *)context)->callback; @@ -20,8 +20,8 @@ static void *threadRun(void *context) { pthread_exit(0); } -static int threadInit(CgeThread *thread, size_t stack, - CgeThreadCallback callback, void *data, int *result) { +static int threadInit(CgeThread *thread, size_t stack, CgeThreadCb callback, + void *data, int *result) { struct CgeThreadContext *context; int code; @@ -54,7 +54,7 @@ static int threadInit(CgeThread *thread, size_t stack, return code == CGE_THREAD_EOK; } -CgeThread *CgeThreadNew(size_t stack, CgeThreadCallback callback, void *data, +CgeThread *CgeThreadNew(size_t stack, CgeThreadCb callback, void *data, int *result) { CgeThread *thread; int code = CGE_THREAD_EOOM; diff --git a/posix/Tss.c b/posix/Tss.c index d349cf7..90e762b 100644 --- a/posix/Tss.c +++ b/posix/Tss.c @@ -3,7 +3,7 @@ #include #include -CgeTss *CgeTssNew(CgeTssCallback callback, int *result) { +CgeTss *CgeTssNew(CgeTssCb callback, int *result) { CgeTss *tss; int code = CGE_THREAD_EOOM; diff --git a/win32/Thread.c b/win32/Thread.c index 66d1d53..bb0eb92 100644 --- a/win32/Thread.c +++ b/win32/Thread.c @@ -3,12 +3,12 @@ #include struct CgeThreadContext { - CgeThreadCallback callback; + CgeThreadCb callback; void *data; }; static unsigned __stdcall threadRun(void *context) { - CgeThreadCallback callback; + CgeThreadCb callback; void *data; callback = ((struct CgeThreadContext *)context)->callback; @@ -18,8 +18,8 @@ static unsigned __stdcall threadRun(void *context) { _endthreadex(0); } -static int threadInit(CgeThread *thread, size_t stack, - CgeThreadCallback callback, void *data, int *result) { +static int threadInit(CgeThread *thread, size_t stack, CgeThreadCb callback, + void *data, int *result) { struct CgeThreadContext *context; context = malloc(sizeof(*context)); @@ -42,7 +42,7 @@ static int threadInit(CgeThread *thread, size_t stack, return 1; } -CgeThread *CgeThreadNew(size_t stack, CgeThreadCallback callback, void *data, +CgeThread *CgeThreadNew(size_t stack, CgeThreadCb callback, void *data, int *result) { CgeThread *thread; diff --git a/win32/Tss.c b/win32/Tss.c index bcef3eb..126664b 100644 --- a/win32/Tss.c +++ b/win32/Tss.c @@ -1,7 +1,7 @@ #include "Internal.h" #include -CgeTss *CgeTssCreate(CgeTssCallback callback, int *result) { +CgeTss *CgeTssCreate(CgeTssCb callback, int *result) { CgeTss *tss; int code = CGE_THREAD_EOOM;