mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 10:11:34 -06:00
ms vc compat...
This commit is contained in:
@@ -52,10 +52,12 @@ pthread_create(pthread_t * thread, const void *unused,
|
|||||||
|
|
||||||
int _pthread_join(pthread_t * thread, void **value_ptr)
|
int _pthread_join(pthread_t * thread, void **value_ptr)
|
||||||
{
|
{
|
||||||
|
DWORD result;
|
||||||
|
|
||||||
if (!thread->handle)
|
if (!thread->handle)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
DWORD result = WaitForSingleObject(thread->handle, INFINITE);
|
result = WaitForSingleObject(thread->handle, INFINITE);
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case WAIT_OBJECT_0:
|
case WAIT_OBJECT_0:
|
||||||
if (value_ptr)
|
if (value_ptr)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ extern "C" {
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
/* mutex */
|
/* mutex */
|
||||||
#define pthread_mutex_t CRITICAL_SECTION
|
#define pthread_mutex_t CRITICAL_SECTION
|
||||||
#define pthread_mutex_init(a,b) InitializeCriticalSection((a))
|
#define pthread_mutex_init(a,b) InitializeCriticalSection((a))
|
||||||
#define pthread_mutex_destroy(a) DeleteCriticalSection((a))
|
#define pthread_mutex_destroy(a) DeleteCriticalSection((a))
|
||||||
#define pthread_mutex_lock EnterCriticalSection
|
#define pthread_mutex_lock EnterCriticalSection
|
||||||
|
|||||||
Reference in New Issue
Block a user