2015-12-09 12:02:00 +01:00
|
|
|
/*
|
2016-01-11 11:02:52 +01:00
|
|
|
* \brief Kernel entrypoint for SMP systems
|
2015-12-09 12:02:00 +01:00
|
|
|
* \author Martin Stein
|
|
|
|
* \author Stefan Kalkowski
|
|
|
|
* \date 2011-10-20
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2016-01-11 11:02:52 +01:00
|
|
|
* Copyright (C) 2011-2016 Genode Labs GmbH
|
2015-12-09 12:02:00 +01:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* core includes */
|
|
|
|
#include <kernel/cpu.h>
|
|
|
|
#include <kernel/lock.h>
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" void kernel()
|
|
|
|
{
|
|
|
|
using namespace Kernel;
|
|
|
|
|
|
|
|
Cpu_job * new_job;
|
|
|
|
unsigned cpu_id;
|
|
|
|
|
|
|
|
{
|
|
|
|
Lock::Guard guard(data_lock());
|
|
|
|
|
|
|
|
cpu_id = Cpu::executing_id();
|
|
|
|
Cpu * const cpu = cpu_pool()->cpu(cpu_id);
|
|
|
|
cpu->scheduled_job().exception(cpu_id);
|
|
|
|
new_job = &cpu->schedule();
|
|
|
|
}
|
|
|
|
|
|
|
|
new_job->proceed(cpu_id);
|
|
|
|
}
|