Add a static kType field to all objects

This commit is contained in:
Dr. Chat 2015-11-12 19:01:55 -06:00
parent b970b970f0
commit 7fc22f1987
9 changed files with 18 additions and 0 deletions

View File

@ -23,6 +23,8 @@ namespace kernel {
class NotifyListener : public XObject {
public:
static const Type kType = kTypeNotifyListener;
explicit NotifyListener(KernelState* kernel_state);
~NotifyListener() override;

View File

@ -21,6 +21,8 @@ namespace kernel {
class XEnumerator : public XObject {
public:
static const Type kType = kTypeEnumerator;
XEnumerator(KernelState* kernel_state, size_t item_capacity,
size_t item_size);
virtual ~XEnumerator();

View File

@ -24,6 +24,8 @@ struct X_KEVENT {
class XEvent : public XObject {
public:
static const Type kType = kTypeEvent;
explicit XEvent(KernelState* kernel_state);
~XEvent() override;

View File

@ -77,6 +77,8 @@ static_assert_size(X_FILE_DIRECTORY_INFORMATION, 72);
class XFile : public XObject {
public:
static const Type kType = kTypeFile;
~XFile() override;
vfs::Device* device() const { return entry_->device(); }

View File

@ -57,6 +57,8 @@ class XModule : public XObject {
kUserModule = 1,
};
static const Type kType = kTypeModule;
XModule(KernelState* kernel_state, ModuleType module_type,
const std::string& path);
virtual ~XModule();

View File

@ -19,6 +19,8 @@ namespace kernel {
class XMutant : public XObject {
public:
static const Type kType = kTypeMutant;
explicit XMutant(KernelState* kernel_state);
~XMutant() override;

View File

@ -24,6 +24,8 @@ struct X_KSEMAPHORE {
class XSemaphore : public XObject {
public:
static const Type kType = kTypeSemaphore;
explicit XSemaphore(KernelState* kernel_state);
~XSemaphore() override;

View File

@ -103,6 +103,8 @@ static_assert_size(X_KTHREAD, 0xAB0);
class XThread : public XObject {
public:
static const Type kType = kTypeThread;
struct CreationParams {
uint32_t stack_size;
uint32_t xapi_thread_startup;

View File

@ -21,6 +21,8 @@ class XThread;
class XTimer : public XObject {
public:
static const Type kType = kTypeTimer;
explicit XTimer(KernelState* kernel_state);
~XTimer() override;