9.04 beta

This commit is contained in:
Igor Pavlov
2009-06-02 00:00:00 +00:00
committed by Kornel Lesiński
parent 8874e4fbc9
commit 829409452d
440 changed files with 19803 additions and 9941 deletions

View File

@@ -3,12 +3,9 @@
#ifndef __WINDOWS_THREAD_H
#define __WINDOWS_THREAD_H
#include "Defs.h"
extern "C"
{
#include "../../C/Threads.h"
}
#include "Defs.h"
namespace NWindows {
@@ -25,14 +22,14 @@ public:
WRes Wait() { return Thread_Wait(&thread); }
#ifdef _WIN32
operator HANDLE() { return thread.handle; }
void Attach(HANDLE handle) { thread.handle = handle; }
HANDLE Detach() { HANDLE h = thread.handle; thread.handle = NULL; return h; }
DWORD Resume() { return ::ResumeThread(thread.handle); }
DWORD Suspend() { return ::SuspendThread(thread.handle); }
bool Terminate(DWORD exitCode) { return BOOLToBool(::TerminateThread(thread.handle, exitCode)); }
int GetPriority() { return ::GetThreadPriority(thread.handle); }
bool SetPriority(int priority) { return BOOLToBool(::SetThreadPriority(thread.handle, priority)); }
operator HANDLE() { return thread; }
void Attach(HANDLE handle) { thread = handle; }
HANDLE Detach() { HANDLE h = thread; thread = NULL; return h; }
DWORD Resume() { return ::ResumeThread(thread); }
DWORD Suspend() { return ::SuspendThread(thread); }
bool Terminate(DWORD exitCode) { return BOOLToBool(::TerminateThread(thread, exitCode)); }
int GetPriority() { return ::GetThreadPriority(thread); }
bool SetPriority(int priority) { return BOOLToBool(::SetThreadPriority(thread, priority)); }
#endif
};