summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-07 16:38:45 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-07 16:38:45 +0100
commit71bffa986443ee464f41284b47eaf7c8b88695ae (patch)
treebdec82256a5e7c0d62cddf0d54e67adef52352c9 /Kernel
parent61a84193d7d28319c8f7d409a6c70edbcae47cac (diff)
downloadserenity-71bffa986443ee464f41284b47eaf7c8b88695ae.zip
Fix whiny build.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Process.cpp8
-rw-r--r--Kernel/TTY.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index d41ac99284..a0fdc848dc 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -23,6 +23,8 @@
#define COOL_GLOBALS
#define MAX_PROCESS_GIDS 32
+static const dword scheduler_time_slice = 5; // *10 = 50ms
+
#ifdef COOL_GLOBALS
struct CoolGlobals {
dword current_pid;
@@ -763,7 +765,7 @@ void Process::send_signal(int signal, Process* sender)
ASSERT(signal < 32);
// FIXME: Handle send_signal to self.
- ASSERT(this != current);
+ ASSERT(this != sender);
auto& action = m_signal_action_data[signal];
// FIXME: Implement SA_SIGINFO signal handlers.
@@ -813,7 +815,7 @@ void Process::send_signal(int signal, Process* sender)
dbgprintf("signal: %s(%u) sent %d to %s(%u)\n", sender->name().characters(), sender->pid(), signal, name().characters(), pid());
- if (sender == this) {
+ if (current == this) {
sched_yield();
ASSERT_NOT_REACHED();
}
@@ -972,7 +974,7 @@ bool scheduleNewProcess()
static bool contextSwitch(Process* t)
{
- t->setTicksLeft(5);
+ t->setTicksLeft(scheduler_time_slice);
t->didSchedule();
if (current == t)
diff --git a/Kernel/TTY.h b/Kernel/TTY.h
index 1770e53a3c..856e8c79d8 100644
--- a/Kernel/TTY.h
+++ b/Kernel/TTY.h
@@ -16,7 +16,7 @@ public:
pid_t pgid() const { return m_pgid; }
protected:
- virtual bool isTTY() const final { return true; }
+ virtual bool isTTY() const final override { return true; }
TTY(unsigned major, unsigned minor);
void emit(byte);