162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef _PERF_PSTACK_ 362306a36Sopenharmony_ci#define _PERF_PSTACK_ 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <stdbool.h> 662306a36Sopenharmony_ci 762306a36Sopenharmony_cistruct pstack; 862306a36Sopenharmony_cistruct pstack *pstack__new(unsigned short max_nr_entries); 962306a36Sopenharmony_civoid pstack__delete(struct pstack *pstack); 1062306a36Sopenharmony_cibool pstack__empty(const struct pstack *pstack); 1162306a36Sopenharmony_civoid pstack__remove(struct pstack *pstack, void *key); 1262306a36Sopenharmony_civoid pstack__push(struct pstack *pstack, void *key); 1362306a36Sopenharmony_civoid *pstack__pop(struct pstack *pstack); 1462306a36Sopenharmony_civoid *pstack__peek(struct pstack *pstack); 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#endif /* _PERF_PSTACK_ */ 17