Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Arnaldo Carvalho de Melo | 3e1bbdc3 | 2010-05-14 20:05:21 -0300 | [diff] [blame] | 2 | #ifndef _PERF_PSTACK_ |
| 3 | #define _PERF_PSTACK_ |
| 4 | |
Arnaldo Carvalho de Melo | d1b4f24 | 2010-08-10 15:49:07 -0300 | [diff] [blame] | 5 | #include <stdbool.h> |
| 6 | |
Arnaldo Carvalho de Melo | 3e1bbdc3 | 2010-05-14 20:05:21 -0300 | [diff] [blame] | 7 | struct pstack; |
| 8 | struct pstack *pstack__new(unsigned short max_nr_entries); |
Arnaldo Carvalho de Melo | 316c713 | 2013-11-05 15:32:36 -0300 | [diff] [blame] | 9 | void pstack__delete(struct pstack *pstack); |
| 10 | bool pstack__empty(const struct pstack *pstack); |
| 11 | void pstack__remove(struct pstack *pstack, void *key); |
| 12 | void pstack__push(struct pstack *pstack, void *key); |
| 13 | void *pstack__pop(struct pstack *pstack); |
Namhyung Kim | c8539e3 | 2015-04-24 10:15:32 +0900 | [diff] [blame] | 14 | void *pstack__peek(struct pstack *pstack); |
Arnaldo Carvalho de Melo | 3e1bbdc3 | 2010-05-14 20:05:21 -0300 | [diff] [blame] | 15 | |
| 16 | #endif /* _PERF_PSTACK_ */ |