Files
serenity/Kernel/DriverInitTable.h
Sönke Holz f9be1b524b Kernel: Consolidate driver init table definitions
The DeviceTree and USB subsystems previously had duplicate definitions.
2025-04-12 16:15:40 +02:00

18 lines
503 B
C++

/*
* Copyright (c) 2025, Sönke Holz <sholz8530@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
namespace Kernel {
using DriverInitFunction = void (*)();
extern "C" DriverInitFunction driver_init_table_start[];
extern "C" DriverInitFunction driver_init_table_end[];
#define DRIVER_INIT_FUNCTION(driver_name, driver_init_function) static Kernel::DriverInitFunction driver_init_function_ptr_##driver_name [[gnu::section(".driver_init"), gnu::used]] = &driver_init_function
}