Apply clang-format code style to all source files
This commit is contained in:
+10
-11
@@ -1,5 +1,5 @@
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
@@ -31,8 +31,8 @@ static unsigned int STDCALL crt_thread_shim(void *outer_ctx)
|
||||
return proc(inner_ctx);
|
||||
}
|
||||
|
||||
int crt_thread_create(int (*proc)(void *), void *ctx, uint32_t stack_sz,
|
||||
unsigned int priority)
|
||||
int crt_thread_create(
|
||||
int (*proc)(void *), void *ctx, uint32_t stack_sz, unsigned int priority)
|
||||
{
|
||||
struct shim_ctx sctx;
|
||||
uintptr_t thread_id;
|
||||
@@ -51,20 +51,20 @@ int crt_thread_create(int (*proc)(void *), void *ctx, uint32_t stack_sz,
|
||||
|
||||
void crt_thread_destroy(int thread_id)
|
||||
{
|
||||
CloseHandle((HANDLE) (uintptr_t) thread_id);
|
||||
CloseHandle((HANDLE)(uintptr_t) thread_id);
|
||||
}
|
||||
|
||||
void crt_thread_join(int thread_id, int *result)
|
||||
{
|
||||
WaitForSingleObject((HANDLE) (uintptr_t) thread_id, INFINITE);
|
||||
WaitForSingleObject((HANDLE)(uintptr_t) thread_id, INFINITE);
|
||||
|
||||
if (result) {
|
||||
GetExitCodeThread((HANDLE) (uintptr_t) thread_id, (DWORD *) result);
|
||||
GetExitCodeThread((HANDLE)(uintptr_t) thread_id, (DWORD *) result);
|
||||
}
|
||||
}
|
||||
|
||||
void thread_api_init(thread_create_t create, thread_join_t join,
|
||||
thread_destroy_t destroy)
|
||||
void thread_api_init(
|
||||
thread_create_t create, thread_join_t join, thread_destroy_t destroy)
|
||||
{
|
||||
if (create == NULL || join == NULL || destroy == NULL) {
|
||||
abort();
|
||||
@@ -75,8 +75,8 @@ void thread_api_init(thread_create_t create, thread_join_t join,
|
||||
thread_impl_destroy = destroy;
|
||||
}
|
||||
|
||||
int thread_create(int (*proc)(void *), void *ctx, uint32_t stack_sz,
|
||||
unsigned int priority)
|
||||
int thread_create(
|
||||
int (*proc)(void *), void *ctx, uint32_t stack_sz, unsigned int priority)
|
||||
{
|
||||
return thread_impl_create(proc, ctx, stack_sz, priority);
|
||||
}
|
||||
@@ -90,4 +90,3 @@ void thread_destroy(int thread_id)
|
||||
{
|
||||
thread_impl_destroy(thread_id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user