# | Line 83 | Line 83 | int32 get_file_size( const char *path ) | |
---|---|---|
83 | } | |
84 | return(size); | |
85 | } | |
86 | + | |
87 | + | |
88 | + | /* |
89 | + | * Thread wrappers |
90 | + | */ |
91 | + | |
92 | + | HANDLE create_thread(LPTHREAD_START_ROUTINE start_routine, void *arg) |
93 | + | { |
94 | + | DWORD dwThreadId; |
95 | + | return CreateThread(NULL, 0, start_routine, arg, 0, &dwThreadId); |
96 | + | } |
97 | + | |
98 | + | void wait_thread(HANDLE thread) |
99 | + | { |
100 | + | WaitForSingleObject(thread, INFINITE); |
101 | + | CloseHandle(thread); |
102 | + | } |
103 | + | |
104 | + | void kill_thread(HANDLE thread) |
105 | + | { |
106 | + | TerminateThread(thread, 0); |
107 | + | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |