![]() |
The ROme OpTimistic Simulator
2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
LP preemption management. More...
#include <timestretch.h>
#include <arch/atomic.h>
#include <core/core.h>
#include <scheduler/process.h>
#include <scheduler/scheduler.h>
#include <mm/dymelor.h>
Go to the source code of this file.
Functions | |
void | preempt_callback (void) |
void | preempt_init (void) |
void | preempt_fini (void) |
void | reset_min_in_transit (unsigned int thread) |
void | update_min_in_transit (unsigned int thread, simtime_t lvt) |
void | preempt (void) |
void | enable_preemption (void) |
void | disable_preemption (void) |
Variables | |
static simtime_t *volatile | min_in_transit_lvt |
atomic_t | preempt_count |
atomic_t | overtick_platform |
atomic_t | would_preempt |
__thread volatile bool | platform_mode = true |
__thread bool | rolling_back = false |
LP preemption management.
LP preemption management
This file is part of ROOT-Sim (ROme OpTimistic Simulator).
ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.
ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file preempt.c.
void preempt | ( | void | ) |
This function is activated when control is transferred back from kernel space, when an APIC timer interrupt is received. When this is the case, this function quickly checks whether some other LP has gained an increased priority over the currently executing one, and in the case changes the control flow so as to activate it.