Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/module/os/freebsd/spl/list.c
/* | /* | ||||
* CDDL HEADER START | * CDDL HEADER START | ||||
* | * | ||||
* The contents of this file are subject to the terms of the | * The contents of this file are subject to the terms of the | ||||
* Common Development and Distribution License (the "License"). | * Common Development and Distribution License (the "License"). | ||||
* You may not use this file except in compliance with the License. | * You may not use this file except in compliance with the License. | ||||
* | * | ||||
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||||
* or http://www.opensolaris.org/os/licensing. | * or http://www.opensolaris.org/os/licensing. | ||||
* See the License for the specific language governing permissions | * See the License for the specific language governing permissions | ||||
* and limitations under the License. | * and limitations under the License. | ||||
* | * | ||||
* When distributing Covered Code, include this CDDL HEADER in each | * nWhen distributing Covered Code, include this CDDL HEADER in each | ||||
* file and include the License file at usr/src/OPENSOLARIS.LICENSE. | * file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||||
* If applicable, add the following below this CDDL HEADER, with the | * If applicable, add the following below this CDDL HEADER, with the | ||||
* fields enclosed by brackets "[]" replaced with your own identifying | * fields enclosed by brackets "[]" replaced with your own identifying | ||||
* information: Portions Copyright [yyyy] [name of copyright owner] | * information: Portions Copyright [yyyy] [name of copyright owner] | ||||
* | * | ||||
* CDDL HEADER END | * CDDL HEADER END | ||||
*/ | */ | ||||
/* | /* | ||||
* 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/param.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/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.