summaryrefslogtreecommitdiff
path: root/Kernel/Process.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-12 01:28:46 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-12 01:28:46 +0100
commitf1404aa9484e1a38b0924f74ac8b5796faf5c77a (patch)
treebe571507f54f885aca4eddd0a8bc03f2ada4ee04 /Kernel/Process.h
parent18e3ddf6058d86f22df9fd90f6ad7f3a3833909f (diff)
downloadserenity-f1404aa9484e1a38b0924f74ac8b5796faf5c77a.zip
Add primitive FIFO and hook it up to sys$pipe().
It's now possible to do this in bash: cat kernel.map | fgrep List This is very cool! :^)
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r--Kernel/Process.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h
index 76218e85ea..c2a76a0571 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -52,6 +52,7 @@ public:
BlockedSleep,
BlockedWait,
BlockedRead,
+ BlockedWrite,
BlockedSignal,
};
@@ -226,6 +227,8 @@ private:
int do_exec(const String& path, Vector<String>&& arguments, Vector<String>&& environment);
void push_value_on_stack(dword);
+ int alloc_fd();
+
PageDirectory* m_page_directory { nullptr };
Process* m_prev { nullptr };
@@ -257,6 +260,7 @@ private:
pid_t m_waitee { -1 };
int m_waitee_status { 0 };
int m_fdBlockedOnRead { -1 };
+ int m_blocked_fd { -1 };
size_t m_max_open_file_descriptors { 16 };
SignalActionData m_signal_action_data[32];
dword m_pending_signals { 0 };
@@ -337,6 +341,7 @@ static inline const char* toString(Process::State state)
case Process::BlockedSleep: return "Sleep";
case Process::BlockedWait: return "Wait";
case Process::BlockedRead: return "Read";
+ case Process::BlockedWrite: return "Write";
case Process::BlockedSignal: return "Signal";
case Process::BeingInspected: return "Inspect";
}