mardyk01 | 7b51dbe | 2024-01-17 15:25:36 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2024, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | |
| 8 | #ifndef NFIFO_H |
| 9 | #define NFIFO_H |
| 10 | |
| 11 | #define CMP_SUCCESS 0 |
| 12 | #define NFIFO_Q_THRESHOLD 10 |
| 13 | |
| 14 | #include <stddef.h> |
| 15 | #include <stdio.h> |
| 16 | #include <stdlib.h> |
| 17 | #include <string.h> |
| 18 | #include "smcmalloc.h" |
| 19 | |
| 20 | struct nfifo { |
| 21 | char **lnme; |
| 22 | int nent; |
| 23 | int thent; |
| 24 | }; |
| 25 | |
| 26 | void nfifoinit(struct nfifo *nf, struct memmod *mmod); |
| 27 | void pushnme(char *nme, struct nfifo *nf, struct memmod *mmod); |
| 28 | char *readnme(int ent, struct nfifo *nf, struct memmod *mmod); |
| 29 | int searchnme(char *nme, struct nfifo *nf, struct memmod *mmod); |
| 30 | void printent(struct nfifo *nf); |
| 31 | |
| 32 | #endif /* NFIFO_H */ |