![]() |
The ROme OpTimistic Simulator
2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
This is the main source for the Linux Kernel Module which implements a schedule-hook module allowing running a custom function each time a thread is cpu rescheduled. More...
#include <linux/module.h>#include <linux/kernel.h>#include <linux/fs.h>#include <linux/cdev.h>#include <linux/errno.h>#include <linux/device.h>#include <linux/kprobes.h>#include <linux/mutex.h>#include <linux/mm.h>#include <linux/sched.h>#include <linux/slab.h>#include <linux/version.h>#include <linux/interrupt.h>#include <linux/time.h>#include <linux/string.h>#include <linux/vmalloc.h>#include <linux/preempt.h>#include <asm/atomic.h>#include "ld.h"#include "lend.h"#include <asm/system.h>#include "schedule.h"
Include dependency graph for schedule.c:Go to the source code of this file.
Data Structures | |
| struct | backup |
| struct | instr |
Typedefs | |
| typedef struct backup | backup_t |
| typedef struct instr | instr_t |
Functions | |
| module_param (the_hook, ulong,(S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH)) | |
| module_param (audit_counter, int,(S_IRUSR|S_IRGRP|S_IROTH)) | |
| static void | synchronize_all_slaves (void *) |
| static int | schedule_hook_init (void) |
| static void | schedule_unpatch (void) |
| static int | schedule_patch (void) |
| static void | print_bytes (char *str, unsigned char *ptr, size_t s) |
| void | schedule_hook (void) |
| void | schedule_hook_2 (void) |
| MODULE_LICENSE ("GPL") | |
| MODULE_AUTHOR ("Alessandro Pellegrini <pellegrini@dis.uniroma1.it>, Francesco Quaglia <quaglia@dis.uniroma1.it>") | |
| MODULE_DESCRIPTION ("Run time patch of the Linux kernel scheduler to support the execution of a generic custom function upon thread reschedule") | |
| module_init (schedule_hook_init) | |
| module_exit (schedule_unpatch) | |
| void | schedule_hook_end (void) |
| void | schedule_hook_patch_point (void) |
| void | schedule_hook_patch_point_2 (void) |
Variables | |
| unsigned long | the_hook = 0 |
| unsigned int | audit_counter = 0 |
| static atomic_t | synch_leave |
| static atomic_t | synch_enter |
| atomic_t | count |
| atomic_t | reference_count |
| ulong | phase = 0 |
| void * | finish_task_switch = (void *)FTS_ADDR |
| void * | finish_task_switch_next = (void *)FTS_ADDR_NEXT |
| backup_t * | b |
| unsigned short int | backup_count = 0 |
This is the main source for the Linux Kernel Module which implements a schedule-hook module allowing running a custom function each time a thread is cpu rescheduled.
Copyright (C) 2014-2017 HPDCS Group http://www.dis.uniroma1.it/~hpdcs
This is free software; You can redistribute it and/or modify this file under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This file 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 this file; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file schedule.c.
| #define synchronize_all | ( | ) |
Definition at line 149 of file schedule.c.
| #define unsynchronize_all | ( | ) |
Definition at line 159 of file schedule.c.