Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/module/os/freebsd/spl/list.c
Show All 21 Lines | |||||
* Copyright 2008 Sun Microsystems, Inc. All rights reserved. | * Copyright 2008 Sun Microsystems, Inc. All rights reserved. | ||||
* Use is subject to license terms. | * Use is subject to license terms. | ||||
*/ | */ | ||||
/* | /* | ||||
* Generic doubly-linked list implementation | * Generic doubly-linked list implementation | ||||
*/ | */ | ||||
#include <sys/ccompile.h> | |||||
freqlabs: This is normally included on the command line. I don't think we should start being inconsistent… | |||||
Done Inline ActionsIt's quite unusual wrt rest of FreeBSD and the boot loader to do this for anything but the global #define options in the kernel... imp: It's quite unusual wrt rest of FreeBSD and the boot loader to do this for anything but the… | |||||
#include <sys/types.h> | |||||
#include <sys/param.h> | |||||
#include <sys/list.h> | #include <sys/list.h> | ||||
#include <sys/list_impl.h> | #include <sys/list_impl.h> | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/sysmacros.h> | |||||
#include <sys/debug.h> | #include <sys/debug.h> | ||||
#define list_d2l(a, obj) ((list_node_t *)(((char *)obj) + (a)->list_offset)) | #define list_d2l(a, obj) ((list_node_t *)(((char *)obj) + (a)->list_offset)) | ||||
#define list_object(a, node) ((void *)(((char *)node) - (a)->list_offset)) | #define list_object(a, node) ((void *)(((char *)node) - (a)->list_offset)) | ||||
#define list_empty(a) ((a)->list_head.list_next == &(a)->list_head) | #define list_empty(a) ((a)->list_head.list_next == &(a)->list_head) | ||||
#define list_insert_after_node(list, node, object) { \ | #define list_insert_after_node(list, node, object) { \ | ||||
list_node_t *lnew = list_d2l(list, object); \ | list_node_t *lnew = list_d2l(list, object); \ | ||||
▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines |
This is normally included on the command line. I don't think we should start being inconsistent about that here.