• Home
  • Raw
  • Download

Lines Matching full:stack

32 /* Error information stack size */
35 /* Error information stack */
37 /* Current point location to the stack. When the value is -1, the stack is empty. */
38 uint16_t bottom; /* Stack bottom */
39 uint16_t top; /* Stack top */
56 /* Avl tree root node of the error stack. */
100 static void StackReset(ErrorCodeStack *stack) in StackReset() argument
102 if (stack != NULL) { in StackReset()
103 (void)memset_s(stack, sizeof(*stack), 0, sizeof(*stack)); in StackReset()
107 static void StackResetIndex(ErrorCodeStack *stack, uint32_t i) in StackResetIndex() argument
109 bool invalid = stack == NULL || i >= SAL_MAX_ERROR_STACK; in StackResetIndex()
111 stack->errorStack[i] = 0; in StackResetIndex()
112 stack->line[i] = 0; in StackResetIndex()
113 stack->filename[i] = NULL; in StackResetIndex()
114 stack->errorFlags[i] = 0; in StackResetIndex()
128 /* If an error stack exists, directly returned. */ in GetStack()
131 /* need to create an error stack */ in GetStack()
137 ErrorCodeStack *stack = (ErrorCodeStack *)BSL_SAL_Calloc(1, sizeof(ErrorCodeStack)); in GetStack() local
138 if (stack == NULL) { in GetStack()
140 "CALLOC error code stack failed", 0, 0, 0, 0); in GetStack()
143 BSL_AvlTree *node = BSL_AVL_MakeLeafNode(stack); in GetStack()
145 StackDataFree(stack); in GetStack()
153 return stack; in GetStack()
170 ErrorCodeStack *stack = GetStack(); in BSL_ERR_PushError() local
171 if (stack != NULL) { in BSL_ERR_PushError()
172 if (stack->top == stack->bottom && stack->errorStack[stack->top] != 0) { in BSL_ERR_PushError()
173 stack->bottom = (stack->bottom + 1) % SAL_MAX_ERROR_STACK; in BSL_ERR_PushError()
175 stack->errorFlags[stack->top] = 0; in BSL_ERR_PushError()
176 stack->errorStack[stack->top] = err; in BSL_ERR_PushError()
177 stack->filename[stack->top] = file; in BSL_ERR_PushError()
178 stack->line[stack->top] = lineNo; in BSL_ERR_PushError()
179 stack->top = (stack->top + 1) % SAL_MAX_ERROR_STACK; in BSL_ERR_PushError()
216 … "acquire lock failed when removing error stack, threadId %llu", BSL_SAL_ThreadGetId(), 0, 0, 0); in BSL_ERR_RemoveErrorStack()
257 If last is true, the last error code at the top of the stack is obtained.
258 If last is false, the first error code at the bottom of the stack is obtained. */
285 if (errStack->errorStack[idx] == 0) { /* error stack is empty */ in GetErrorInfo()
471 if (errStack->errorStack[top] == 0) { /* error stack is empty */ in BSL_ERR_SetMark()