diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-05 20:01:10 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-05 20:01:10 +0200 |
commit | c3b63b831cd2c64700e875b28540212c7c881ac6 (patch) | |
tree | edd98fcbd2004d3b562904f822bf6c3322fc7f52 /other-licenses/7zstub/src/Windows/Thread.h | |
parent | d432e068a21c815d5d5e7bcbc1cc8c6e77a7d1e0 (diff) | |
parent | cc07da9cb4d6e7a53f8d953427ffc2bca2e0c2df (diff) | |
download | UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.gz UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.lz UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.xz UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.zip |
Merge branch 'master' into 816
Diffstat (limited to 'other-licenses/7zstub/src/Windows/Thread.h')
-rw-r--r-- | other-licenses/7zstub/src/Windows/Thread.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/other-licenses/7zstub/src/Windows/Thread.h b/other-licenses/7zstub/src/Windows/Thread.h deleted file mode 100644 index 76be6dfba..000000000 --- a/other-licenses/7zstub/src/Windows/Thread.h +++ /dev/null @@ -1,52 +0,0 @@ -// Windows/Thread.h
-
-#ifndef __WINDOWS_THREAD_H
-#define __WINDOWS_THREAD_H
-
-#include "Handle.h"
-#include "Defs.h"
-
-namespace NWindows {
-
-class CThread: public CHandle
-{
- bool IsOpen() const { return _handle != 0; }
-public:
- bool Create(LPSECURITY_ATTRIBUTES threadAttributes,
- SIZE_T stackSize, LPTHREAD_START_ROUTINE startAddress,
- LPVOID parameter, DWORD creationFlags, LPDWORD threadId)
- {
- _handle = ::CreateThread(threadAttributes, stackSize, startAddress,
- parameter, creationFlags, threadId);
- return (_handle != NULL);
- }
- bool Create(LPTHREAD_START_ROUTINE startAddress, LPVOID parameter)
- {
- DWORD threadId;
- return Create(NULL, 0, startAddress, parameter, 0, &threadId);
- }
-
- DWORD Resume()
- { return ::ResumeThread(_handle); }
- DWORD Suspend()
- { return ::SuspendThread(_handle); }
- bool Terminate(DWORD exitCode)
- { return BOOLToBool(::TerminateThread(_handle, exitCode)); }
-
- int GetPriority()
- { return ::GetThreadPriority(_handle); }
- bool SetPriority(int priority)
- { return BOOLToBool(::SetThreadPriority(_handle, priority)); }
-
- bool Wait()
- {
- if (!IsOpen())
- return true;
- return (::WaitForSingleObject(_handle, INFINITE) == WAIT_OBJECT_0);
- }
-
-};
-
-}
-
-#endif
|