mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
abd_os: break out platform-specific header parts
Removing the platform #ifdefs from shared headers in favour of per-platform headers. Makes abd_t much leaner, among other things. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16253
This commit is contained in:
committed by
Brian Behlendorf
parent
7a5b4355e2
commit
5b9e695392
+1
-13
@@ -28,6 +28,7 @@
|
||||
#define _ABD_IMPL_H
|
||||
|
||||
#include <sys/abd.h>
|
||||
#include <sys/abd_impl_os.h>
|
||||
#include <sys/wmsum.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -111,19 +112,6 @@ void abd_iter_page(struct abd_iter *);
|
||||
#define ABD_LINEAR_BUF(abd) (abd->abd_u.abd_linear.abd_buf)
|
||||
#define ABD_GANG(abd) (abd->abd_u.abd_gang)
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#if defined(__FreeBSD__)
|
||||
#define abd_enter_critical(flags) critical_enter()
|
||||
#define abd_exit_critical(flags) critical_exit()
|
||||
#else
|
||||
#define abd_enter_critical(flags) local_irq_save(flags)
|
||||
#define abd_exit_critical(flags) local_irq_restore(flags)
|
||||
#endif
|
||||
#else /* !_KERNEL */
|
||||
#define abd_enter_critical(flags) ((void)0)
|
||||
#define abd_exit_critical(flags) ((void)0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user