XHostThread class

This commit is contained in:
Dr. Chat
2015-05-18 22:23:59 -05:00
parent bb5466d7b2
commit ffe3b4bf04
2 changed files with 59 additions and 10 deletions

View File

@@ -47,7 +47,7 @@ class XThread : public XObject {
X_STATUS Create();
X_STATUS Exit(int exit_code);
void Execute();
virtual void Execute();
static void EnterCriticalRegion();
static void LeaveCriticalRegion();
@@ -69,7 +69,7 @@ class XThread : public XObject {
virtual void* GetWaitHandle();
private:
protected:
X_STATUS PlatformCreate();
void PlatformDestroy();
X_STATUS PlatformExit(int exit_code);
@@ -103,6 +103,17 @@ class XThread : public XObject {
XEvent* event_;
};
class XHostThread : public XThread {
public:
XHostThread(KernelState* kernel_state, uint32_t stack_size,
uint32_t creation_flags, std::function<int()> host_fn);
virtual void Execute();
private:
std::function<int()> host_fn_;
};
} // namespace kernel
} // namespace xe