1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2018 Intel Corporation
10 static struct swq_list swq_list;
15 TAILQ_INIT(&swq_list);
21 swq_find(const char *name)
28 TAILQ_FOREACH(swq, &swq_list, node)
29 if (strcmp(swq->name, name) == 0)
36 swq_create(const char *name, struct swq_params *params)
40 unsigned int flags = RING_F_SP_ENQ | RING_F_SC_DEQ;
42 /* Check input params */
60 swq = calloc(1, sizeof(struct swq));
67 strncpy(swq->name, name, sizeof(swq->name));
70 /* Node add to list */
71 TAILQ_INSERT_TAIL(&swq_list, swq, node);