feat: reformatted code base to be more standard
This commit is contained in:
22
include/myke/driver.h
Normal file
22
include/myke/driver.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by rick on 06-03-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_DRIVER_H
|
||||
#define NEW_KERNEL_DRIVER_H
|
||||
#include <myke/attributes.h>
|
||||
#include <myke/preprocessor_format_zero.h>
|
||||
|
||||
#ifndef STRUCT_ALIGNMENT
|
||||
#define STRUCT_ALIGNMENT 16
|
||||
#endif
|
||||
#define DRIVER_CAT(a, b) DRIVER_DUMMY() a ## _ ## b
|
||||
#define DRIVER_DUMMY()
|
||||
#define SECT_NAME_(a,b) "." #a "." #b
|
||||
#define SECT_NAME(a,b) SECT_NAME_(a, b)
|
||||
|
||||
#define GENERIC_DRIVER(drivername, order) \
|
||||
static struct drivername DRIVER_CAT(drivername, counter) \
|
||||
__attribute((__used__, __section__(SECT_NAME(drivername, FORMAT_3_ZERO(order)))))
|
||||
|
||||
#endif //NEW_KERNEL_DRIVER_H
|
||||
Reference in New Issue
Block a user