1*05d3b528SGage Eads.. SPDX-License-Identifier: BSD-3-Clause 2*05d3b528SGage Eads Copyright(c) 2019 Intel Corporation. 3*05d3b528SGage Eads 4*05d3b528SGage EadsStack Library 5*05d3b528SGage Eads============= 6*05d3b528SGage Eads 7*05d3b528SGage EadsDPDK's stack library provides an API for configuration and use of a bounded 8*05d3b528SGage Eadsstack of pointers. 9*05d3b528SGage Eads 10*05d3b528SGage EadsThe stack library provides the following basic operations: 11*05d3b528SGage Eads 12*05d3b528SGage Eads* Create a uniquely named stack of a user-specified size and using a 13*05d3b528SGage Eads user-specified socket. 14*05d3b528SGage Eads 15*05d3b528SGage Eads* Push and pop a burst of one or more stack objects (pointers). These function 16*05d3b528SGage Eads are multi-threading safe. 17*05d3b528SGage Eads 18*05d3b528SGage Eads* Free a previously created stack. 19*05d3b528SGage Eads 20*05d3b528SGage Eads* Lookup a pointer to a stack by its name. 21*05d3b528SGage Eads 22*05d3b528SGage Eads* Query a stack's current depth and number of free entries. 23*05d3b528SGage Eads 24*05d3b528SGage EadsImplementation 25*05d3b528SGage Eads~~~~~~~~~~~~~~ 26*05d3b528SGage Eads 27*05d3b528SGage EadsThe stack consists of a contiguous array of pointers, a current index, and a 28*05d3b528SGage Eadsspinlock. Accesses to the stack are made multi-thread safe by the spinlock. 29