Skip to content
Snippets Groups Projects
Commit d73d782b authored by bunnei's avatar bunnei
Browse files

kernel: add a SyncRequest method to KernelObject for use with svcSendSyncRequest

parent 15d2ab1b
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,7 @@ public: ...@@ -42,6 +42,7 @@ public:
virtual const char *GetTypeName() { return "[BAD KERNEL OBJECT TYPE]"; } virtual const char *GetTypeName() { return "[BAD KERNEL OBJECT TYPE]"; }
virtual const char *GetName() { return "[UNKNOWN KERNEL OBJECT]"; } virtual const char *GetName() { return "[UNKNOWN KERNEL OBJECT]"; }
virtual Kernel::HandleType GetHandleType() const = 0; virtual Kernel::HandleType GetHandleType() const = 0;
virtual Result SyncRequest() = 0;
}; };
class ObjectPool : NonCopyable { class ObjectPool : NonCopyable {
......
...@@ -23,6 +23,11 @@ public: ...@@ -23,6 +23,11 @@ public:
bool locked; ///< Current locked state bool locked; ///< Current locked state
Handle lock_thread; ///< Handle to thread that currently has mutex Handle lock_thread; ///< Handle to thread that currently has mutex
std::vector<Handle> waiting_threads; ///< Threads that are waiting for the mutex std::vector<Handle> waiting_threads; ///< Threads that are waiting for the mutex
/// Synchronize kernel object
Result SyncRequest() {
return 0;
}
}; };
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
......
...@@ -36,6 +36,11 @@ public: ...@@ -36,6 +36,11 @@ public:
inline bool IsWaiting() const { return (status & THREADSTATUS_WAIT) != 0; } inline bool IsWaiting() const { return (status & THREADSTATUS_WAIT) != 0; }
inline bool IsSuspended() const { return (status & THREADSTATUS_SUSPEND) != 0; } inline bool IsSuspended() const { return (status & THREADSTATUS_SUSPEND) != 0; }
/// Synchronize kernel object
Result SyncRequest() {
return 0;
}
ThreadContext context; ThreadContext context;
u32 status; u32 status;
......
...@@ -26,12 +26,6 @@ public: ...@@ -26,12 +26,6 @@ public:
return "srv:"; return "srv:";
} }
/**
* Called when svcSendSyncRequest is called, loads command buffer and executes comand
* @return Return result of svcSendSyncRequest passed back to user app
*/
Result Sync();
}; };
} // namespace } // namespace
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment