Use macro wrappers for device op prototypes
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m35s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m35s
This commit is contained in:
19
kernel/device/def_device_op.h
Normal file
19
kernel/device/def_device_op.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _KERNEL_DEVICE_DEF_DEVICE_OP_H
|
||||
#define _KERNEL_DEVICE_DEF_DEVICE_OP_H
|
||||
|
||||
#include <aux/compiler.h>
|
||||
|
||||
#define DEFINE_DEVICE_OP(name) \
|
||||
int name (struct device* UNUSED device, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, uint64_t* UNUSED lockflags, void* UNUSED a1, \
|
||||
void* UNUSED a2, void* UNUSED a3, void* UNUSED a4)
|
||||
|
||||
#define DEFINE_DEVICE_INIT(name) \
|
||||
bool name (struct device* UNUSED device, void* UNUSED arg, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx)
|
||||
|
||||
#define DEFINE_DEVICE_FINI(name) \
|
||||
void name (struct device* UNUSED device, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx)
|
||||
|
||||
#endif // _KERNEL_DEVICE_DEF_DEVICE_OP_H
|
||||
Reference in New Issue
Block a user