18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _PERF_PSTACK_ 38c2ecf20Sopenharmony_ci#define _PERF_PSTACK_ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <stdbool.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_cistruct pstack; 88c2ecf20Sopenharmony_cistruct pstack *pstack__new(unsigned short max_nr_entries); 98c2ecf20Sopenharmony_civoid pstack__delete(struct pstack *pstack); 108c2ecf20Sopenharmony_cibool pstack__empty(const struct pstack *pstack); 118c2ecf20Sopenharmony_civoid pstack__remove(struct pstack *pstack, void *key); 128c2ecf20Sopenharmony_civoid pstack__push(struct pstack *pstack, void *key); 138c2ecf20Sopenharmony_civoid *pstack__pop(struct pstack *pstack); 148c2ecf20Sopenharmony_civoid *pstack__peek(struct pstack *pstack); 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#endif /* _PERF_PSTACK_ */ 17