1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * A generic stack depot implementation
5 * Author: Alexander Potapenko <glider@google.com>
6 * Copyright (C) 2016 Google, Inc.
8 * Based on code by Dmitry Chernenkov.
11 #ifndef _LINUX_STACKDEPOT_H
12 #define _LINUX_STACKDEPOT_H
14 typedef u32 depot_stack_handle_t
;
16 depot_stack_handle_t
stack_depot_save(unsigned long *entries
,
17 unsigned int nr_entries
, gfp_t gfp_flags
);
19 unsigned int stack_depot_fetch(depot_stack_handle_t handle
,
20 unsigned long **entries
);
22 #ifdef CONFIG_STACKDEPOT
23 int stack_depot_init(void);
25 static inline int stack_depot_init(void)
29 #endif /* CONFIG_STACKDEPOT */