Thread Synch AOSV 2020  1.2
LKM for exchanging messages between threads
Macros | Functions
sysfs.h File Reference

Setup the required sysfs interfaces for the module. More...

#include <linux/fs.h>
#include <linux/kobject.h>
#include <uapi/linux/stat.h>
#include <linux/kernel.h>
#include <linux/rwsem.h>
#include <linux/uaccess.h>
#include <linux/cred.h>
#include "types.h"
Include dependency graph for sysfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ATTR_BUFF_SIZE   64
 

Functions

int initSysFs (group_data *grp_data)
 Initialize sysfs attributes. More...
 
void releaseSysFs (group_sysfs_t *sysfs)
 Deallocate all sysfs attributes. More...
 

Detailed Description

Setup the required sysfs interfaces for the module.

Function Documentation

◆ initSysFs()

int initSysFs ( group_data grp_data)

Initialize sysfs attributes.

Parameters
[in]grp_dataPointer to the main structure of a group
Note
In case the file's attribute cannot be created, no error is returned
Returns
0 on success, negative number on error

◆ releaseSysFs()

void releaseSysFs ( group_sysfs_t *  sysfs)

Deallocate all sysfs attributes.

Parameters
[in]sysfsPointer to the 'group_sysfs_t' structure of a group
Returns
nothing