Lines Matching defs:stk
67 cstack_t *stk;
69 if ((stk = ndmp_malloc(sizeof (cstack_t))) == NULL)
72 return (stk);
84 cstack_delete(cstack_t *stk)
88 if (stk == NULL) {
93 while ((tmp = stk->next) != NULL) {
94 stk->next = tmp->next;
99 NDMP_LOG(LOG_DEBUG, "cstack_delete: 0x%p", stk);
100 free(stk);
115 cstack_push(cstack_t *stk, void *data, int len)
119 if (stk == NULL) {
129 stk_node->next = stk->next;
130 stk->next = stk_node;
132 NDMP_LOG(LOG_DEBUG, "cstack_push(0x%p): 0x%p", stk, stk_node);
146 cstack_pop(cstack_t *stk, void **data, int *len)
150 if (stk == NULL) {
155 if ((stk_node = stk->next) == NULL) {
166 stk->next = stk_node->next;
167 NDMP_LOG(LOG_DEBUG, "cstack_pop(0x%p): 0x%p", stk, stk_node);
181 cstack_top(cstack_t *stk, void **data, int *len)
183 if (stk == NULL) {
188 if (stk->next == NULL) {
194 *data = stk->next->data;
197 *len = stk->next->len;