mirror of
https://github.com/Xevion/easy7zip.git
synced 2026-01-31 22:24:08 -06:00
4.46 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
a145bfc7cf
commit
c574fc0f4b
+11
-2
@@ -1,4 +1,4 @@
|
||||
/* Thresds.h */
|
||||
/* Threads.h */
|
||||
|
||||
#ifndef __7Z_THRESDS_H
|
||||
#define __7Z_THRESDS_H
|
||||
@@ -15,7 +15,11 @@ typedef struct _CThread
|
||||
#define Thread_Construct(thread) (thread)->handle = NULL
|
||||
#define Thread_WasCreated(thread) ((thread)->handle != NULL)
|
||||
|
||||
HRes Thread_Create(CThread *thread, unsigned (StdCall *startAddress)(void *), LPVOID parameter);
|
||||
typedef unsigned THREAD_FUNC_RET_TYPE;
|
||||
#define THREAD_FUNC_CALL_TYPE StdCall
|
||||
#define THREAD_FUNC_DECL THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE
|
||||
|
||||
HRes Thread_Create(CThread *thread, THREAD_FUNC_RET_TYPE (THREAD_FUNC_CALL_TYPE *startAddress)(void *), LPVOID parameter);
|
||||
HRes Thread_Wait(CThread *thread);
|
||||
HRes Thread_Close(CThread *thread);
|
||||
|
||||
@@ -25,9 +29,13 @@ typedef struct _CEvent
|
||||
} CEvent;
|
||||
|
||||
typedef CEvent CAutoResetEvent;
|
||||
typedef CEvent CManualResetEvent;
|
||||
|
||||
#define Event_Construct(event) (event)->handle = NULL
|
||||
#define Event_IsCreated(event) ((event)->handle != NULL)
|
||||
|
||||
HRes ManualResetEvent_Create(CManualResetEvent *event, int initialSignaled);
|
||||
HRes ManualResetEvent_CreateNotSignaled(CManualResetEvent *event);
|
||||
HRes AutoResetEvent_Create(CAutoResetEvent *event, int initialSignaled);
|
||||
HRes AutoResetEvent_CreateNotSignaled(CAutoResetEvent *event);
|
||||
HRes Event_Set(CEvent *event);
|
||||
@@ -44,6 +52,7 @@ typedef struct _CSemaphore
|
||||
#define Semaphore_Construct(p) (p)->handle = NULL
|
||||
|
||||
HRes Semaphore_Create(CSemaphore *p, UInt32 initiallyCount, UInt32 maxCount);
|
||||
HRes Semaphore_ReleaseN(CSemaphore *p, UInt32 num);
|
||||
HRes Semaphore_Release1(CSemaphore *p);
|
||||
HRes Semaphore_Wait(CSemaphore *p);
|
||||
HRes Semaphore_Close(CSemaphore *p);
|
||||
|
||||
Reference in New Issue
Block a user