mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Consolodate koid and close syscalls
A number of object types had _close or _koid syscalls. Moved those to be generic for kobject.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
/// Definition of base type for user-interactable kernel objects
|
||||
|
||||
#include "j6/errors.h"
|
||||
#include "j6/signals.h"
|
||||
#include "j6/types.h"
|
||||
#include "kutil/vector.h"
|
||||
|
||||
@@ -76,6 +77,12 @@ public:
|
||||
/// Remove the given thread from the list of threads waiting on this object.
|
||||
inline void remove_blocked_thread(thread *t) { m_blocked_threads.remove_swap(t); }
|
||||
|
||||
/// Perform any cleanup actions necessary to mark this object closed
|
||||
virtual void close();
|
||||
|
||||
/// Check if this object has been closed
|
||||
inline bool closed() const { return check_signal(j6_signal_closed); }
|
||||
|
||||
protected:
|
||||
/// Interface for subclasses to handle when all handles are closed. Subclasses
|
||||
/// should either call the base version, or assert j6_signal_no_handles.
|
||||
|
||||
Reference in New Issue
Block a user