win32: prepare pthread.c for change by formatting
File has been formatted to meet coding guidelines. Signed-off-by: Seija Kijin <doremylover123@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Seija Kijin committed
Jan 3, 2023 at 16:20 UTC
23a6a12dfa317e48627c8fec72ee80151276bad6
1 file changed
+11
-11
compat/win32/pthread.c
+11
-11
@@ -22,12 +22,12 @@ static unsigned __stdcall win32_start_routine(void *arg)
22
}
23
24
int pthread_create(pthread_t *thread, const void *unused,
25
- void *(*start_routine)(void*), void *arg)
25
+ void *(*start_routine)(void *), void *arg)
26
{
27
thread->arg = arg;
28
thread->start_routine = start_routine;
29
- thread->handle = (HANDLE)
30
- _beginthreadex(NULL, 0, win32_start_routine, thread, 0, NULL);
29
+ thread->handle = (HANDLE)_beginthreadex(NULL, 0, win32_start_routine,
30
+ thread, 0, NULL);
31
32
if (!thread->handle)
33
return errno;
@@ -39,14 +39,14 @@ int win32_pthread_join(pthread_t *thread, void **value_ptr)
39
{
40
DWORD result = WaitForSingleObject(thread->handle, INFINITE);
41
switch (result) {
42
- case WAIT_OBJECT_0:
43
- if (value_ptr)
44
- *value_ptr = thread->arg;
45
- return 0;
46
- case WAIT_ABANDONED:
47
- return EINVAL;
48
- default:
49
- return err_win_to_posix(GetLastError());
42
+ case WAIT_OBJECT_0:
43
+ if (value_ptr)
44
+ *value_ptr = thread->arg;
45
+ return 0;
46
+ case WAIT_ABANDONED:
47
+ return EINVAL;
48
+ default:
49
+ return err_win_to_posix(GetLastError());
50
}
51
}
52