include/linux/kho_radix_tree.h

Source file repositories/reference/linux-study-clean/include/linux/kho_radix_tree.h

File Facts

System
Linux kernel
Corpus path
include/linux/kho_radix_tree.h
Extension
.h
Size
2134 bytes
Lines
71
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct kho_radix_tree {
	struct kho_radix_node *root;
	struct mutex lock; /* protects the tree's structure and root pointer */
};

typedef int (*kho_radix_tree_walk_callback_t)(phys_addr_t phys,
					      unsigned int order);

#ifdef CONFIG_KEXEC_HANDOVER

int kho_radix_add_page(struct kho_radix_tree *tree, unsigned long pfn,
		       unsigned int order);

void kho_radix_del_page(struct kho_radix_tree *tree, unsigned long pfn,
			unsigned int order);

int kho_radix_walk_tree(struct kho_radix_tree *tree,
			kho_radix_tree_walk_callback_t cb);

#else  /* #ifdef CONFIG_KEXEC_HANDOVER */

static inline int kho_radix_add_page(struct kho_radix_tree *tree, long pfn,
				     unsigned int order)
{
	return -EOPNOTSUPP;
}

static inline void kho_radix_del_page(struct kho_radix_tree *tree,
				      unsigned long pfn, unsigned int order) { }

static inline int kho_radix_walk_tree(struct kho_radix_tree *tree,
				      kho_radix_tree_walk_callback_t cb)
{
	return -EOPNOTSUPP;
}

#endif /* #ifdef CONFIG_KEXEC_HANDOVER */

#endif	/* _LINUX_KHO_RADIX_TREE_H */

Annotation

Implementation Notes