/* * Copyright 2020, Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. */ #ifndef _AUTO_DELETER_DRIVERS_H #define _AUTO_DELETER_DRIVERS_H #include #include #if defined(_KERNEL_MODE) && !defined(_BOOT_MODE) #include #include #include #include #endif namespace BPrivate { typedef CObjectDeleter DriverSettingsUnloader; #if defined(_KERNEL_MODE) && !defined(_BOOT_MODE) typedef CObjectDeleter VnodePutter; typedef CObjectDeleter DescriptorPutter; typedef MethodDeleter VMAddressSpacePutter; #if __GNUC__ >= 4 template using DeviceNodePutter = MethodObjectDeleter; #else template struct DeviceNodePutter : MethodObjectDeleter { typedef MethodObjectDeleter Base; DeviceNodePutter() : Base() {} DeviceNodePutter(device_node* object) : Base(object) {} }; #endif #endif } using ::BPrivate::DriverSettingsUnloader; #if defined(_KERNEL_MODE) && !defined(_BOOT_MODE) using ::BPrivate::VnodePutter; using ::BPrivate::DescriptorPutter; using ::BPrivate::VMAddressSpacePutter; using ::BPrivate::DeviceNodePutter; #endif #endif // _AUTO_DELETER_DRIVERS_H