1
ˆ
0ÂÁÀ ˆ
ƒ-»_•I|¥‰ÓMdœv ©ƒ&íK<óo¬ÂÁ 5
Index of /FSS-BCZ/root/proc/self/cwd/sys/bus/acpi/devices/device:0a
Index of /FSS-BCZ/root/proc/self/cwd/sys/bus/acpi/devices/device:0a
A ˆl–äY>”TÔD¨ Å�rãO©‹FÿÀ
ƒp{_†I|¥�+a–Ðz¾”Šj"Tâ�fãlÜhJbÑ¿Ä ‚ /* SPDX-License-Identifier: GPL-2.0 */
#ifndef LIST_H
#define LIST_H
#include
#include
/* Are two types/vars the same type (ignoring qualifiers)? */
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.
* @type: the type of the container struct this is embedded in.
* @member: the name of the member within the struct.
*
*/
#define container_of(ptr, type, member) ({ \
void *__mptr = (void *)(ptr); \
_Static_assert(__same_type(*(ptr), ((type *)0)->member) || \
__same_type(*(ptr), void), \
"pointer type mismatch in container_of()"); \
((type *)(__mptr - offsetof(type, member))); })
#define LIST_POISON1 ((void *) 0x100)
#define LIST_POISON2 ((void *) 0x122)
/*
* Circular doubly linked list implementation.
*
* Some of the internal functions ("__xxx") are useful when
* manipulating whole lists rather than single entries, as
* sometimes we already know the next/prev entries and we can
* generate better code by using them directly rather than
* using the generic single-entry routines.
*/
struct list_head {
struct list_head *next, *prev;
};
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \
struct list_head name = LIST_HEAD_INIT(name)
/**
* INIT_LIST_HEAD - Initialize a list_head structure
* @list: list_head structure to be initialized.
*
* Initializes the list_head to point to itself. If it is a list header,
* the result is