rust/helpers/list.c

Source file repositories/reference/linux-study-clean/rust/helpers/list.c

File Facts

System
Linux kernel
Corpus path
rust/helpers/list.c
Extension
.c
Size
352 bytes
Lines
18
Domain
Rust Kernel Layer
Bucket
Rust API Membrane
Inferred role
Rust Kernel Layer: implementation source
Status
source implementation candidate

Why This File Exists

Rust-side wrappers and abstractions around kernel C APIs, ownership contracts, allocation, synchronization, and module integration.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0

/*
 * Helpers for C circular doubly linked list implementation.
 */

#include <linux/list.h>

__rust_helper void rust_helper_INIT_LIST_HEAD(struct list_head *list)
{
	INIT_LIST_HEAD(list);
}

__rust_helper void rust_helper_list_add_tail(struct list_head *new, struct list_head *head)
{
	list_add_tail(new, head);
}

Annotation

Implementation Notes