21 lines
472 B
C
21 lines
472 B
C
//
|
|
// Created by rick on 06-03-21.
|
|
//
|
|
|
|
#ifndef NEW_KERNEL_DRIVER_H
|
|
#define NEW_KERNEL_DRIVER_H
|
|
#include <attributes.h>
|
|
|
|
#ifndef STRUCT_ALIGNMENT
|
|
#define STRUCT_ALIGNMENT 16
|
|
#endif
|
|
#define DRIVER_CAT(a, b) DRIVER_DUMMY() a ## _ ## b
|
|
#define DRIVER_DUMMY()
|
|
|
|
#define GENERIC_DRIVER(drivername, data...) \
|
|
static struct drivername DRIVER_CAT(drivername, __COUNTER__) \
|
|
__attribute((__used__, __section__(#drivername))) \
|
|
= { data }
|
|
|
|
#endif //NEW_KERNEL_DRIVER_H
|