Thread Synch AOSV 2020
1.2
LKM for exchanging messages between threads
|
Defines all structures and global variables needed by the module. More...
#include <linux/types.h>
#include <linux/list.h>
#include <linux/rwsem.h>
#include <linux/workqueue.h>
#include <linux/cdev.h>
#include <linux/timer.h>
#include <linux/wait.h>
#include <linux/sched.h>
Go to the source code of this file.
Data Structures | |
struct | msg_t |
Basic structure to represent a message. More... | |
struct | t_group_members |
Threads that are members of the group device. More... | |
struct | t_message_deliver |
Contains a 'msg_t' structure and the relative delivery info. More... | |
struct | t_message_delayed_deliver |
Contains a 'msg_t' structure and the timer needed to delay the delivery. More... | |
struct | t_group_sysfs |
Contains all the 'sysfs' attrubutes and the group's kobject. More... | |
struct | msg_manager_t |
Manage the message sub-system. More... | |
struct | group_t |
System-wide descriptor of a group. More... | |
struct | group_flags_t |
Contains the various flags that represent the status of the module. More... | |
struct | t_garbage_collector |
Garbage Collector structure. More... | |
struct | group_data |
Group device data structure. More... | |
Macros | |
#define | DEVICE_NAME_SIZE 64 |
#define | DEBUG |
Functions | |
struct group_flags_t | __attribute__ ((packed)) g_flags_t |
Contains the various flags that represent the status of the module. More... | |
Variables | |
unsigned int | initialized |
unsigned int | thread_barrier_loaded |
unsigned int | wake_up_flag |
unsigned int | sysfs_loaded |
unsigned int | strict_mode |
unsigned int | garbage_collector_disabled |
unsigned int | gc_include_struct |
Defines all structures and global variables needed by the module.
#define DEVICE_NAME_SIZE 64 |
Maximum device name lenght
struct group_flags_t __attribute__ | ( | (packed) | ) |
Contains the various flags that represent the status of the module.
Those flags are useful since it indicates if a module was correctly initialized, in this way when the module must be unloaded, no deallocation is performed on modules that failed.
unsigned int garbage_collector_disabled |
1 if the garbage collector is disabled, zero otherwise
unsigned int gc_include_struct |
1 if the structure related to a message should be included in the size count
unsigned int initialized |
Set to 1 when the device driver is fully loaded
unsigned int sysfs_loaded |
1 if the sysfs submodule is initialized correctly
unsigned int thread_barrier_loaded |
1 if the 'thread_barrier' submodule is initialized
unsigned int wake_up_flag |
Flag used to wake-up all thread which slept on barrier