xenia-canary/src/xenia/kernel/objects/xmutant.h

40 lines
1.2 KiB
C
Raw Normal View History

2014-01-08 02:32:55 +00:00
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_KERNEL_XBOXKRNL_XMUTANT_H_
#define XENIA_KERNEL_XBOXKRNL_XMUTANT_H_
#include "xenia/base/platform_win.h"
2015-02-01 06:49:47 +00:00
#include "xenia/kernel/xobject.h"
#include "xenia/xbox.h"
2014-01-08 02:32:55 +00:00
namespace xe {
namespace kernel {
class XMutant : public XObject {
2014-08-17 20:13:03 +00:00
public:
2014-01-08 02:32:55 +00:00
XMutant(KernelState* kernel_state);
virtual ~XMutant();
void Initialize(bool initial_owner);
2015-06-12 23:59:08 +00:00
void InitializeNative(void* native_ptr, X_DISPATCH_HEADER& header);
2014-01-08 02:32:55 +00:00
X_STATUS ReleaseMutant(uint32_t priority_increment, bool abandon, bool wait);
virtual void* GetWaitHandle() { return native_handle_; }
2014-01-08 02:32:55 +00:00
2014-08-17 20:13:03 +00:00
private:
HANDLE native_handle_;
2014-01-08 02:32:55 +00:00
};
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XBOXKRNL_XMUTANT_H_