Esempio n. 1
0
struct ZObjInstance *
__get_cur_error()
{
	unsigned long thread_id = cur_thread;
	spinLock(&spin_lk);
	struct RBNode *stack = rbSearch(stack_tree, &thread_id);
	spinUnlock(&spin_lk);
	assert(to_stack(stack)->cur_error != NULL);
	return to_stack(stack)->cur_error;
}
Esempio n. 2
0
void
__throw(struct ZObjInstance *e)
{
	unsigned long thread_id = cur_thread;
	spinLock(&spin_lk);
	struct RBNode *stack = rbSearch(stack_tree, &thread_id);
	spinUnlock(&spin_lk);
	to_stack(stack)->cur_error = e;
	longjmp(to_stack(stack)->stack_top->jb, 1);
}
Esempio n. 3
0
void
__pop_jmp_point()
{
	unsigned long thread_id = cur_thread;
	spinLock(&spin_lk);
	struct RBNode *stack = rbSearch(stack_tree, &thread_id);
	spinUnlock(&spin_lk);
	struct stack_node *node = to_stack(stack)->stack_top;
	assert(node != NULL);
	to_stack(stack)->stack_top = node->prev;
	free(node);
}	
Esempio n. 4
0
void *
__push_jmp_point()
{
	unsigned long thread_id = cur_thread;
	spinLock(&spin_lk);
	rbInsert(&stack_tree, &thread_id);
	spinUnlock(&spin_lk);
	struct RBNode *stack = rbSearch(stack_tree, &thread_id);
	struct stack_node *new_node = malloc(sizeof(struct stack_node));
	assert(new_node != NULL);
	new_node->prev = to_stack(stack)->stack_top;
	to_stack(stack)->stack_top = new_node;
	return new_node->jb;
}
Esempio n. 5
0
void LYstore_message(const char *message)
{
    if (message != NULL) {
	char *temp = NULL;

	StrAllocCopy(temp, message);
	to_stack(temp);
    }
}
Esempio n. 6
0
void LYstore_message2(const char *message,
		      const char *argument)
{

    if (message != NULL) {
	char *temp = NULL;

	HTSprintf0(&temp, message, NonNull(argument));
	to_stack(temp);
    }
}
Esempio n. 7
0
static void *
get_thread_id(struct RBNode *node)
{
	return &to_stack(node)->thread_id;
}