示例#1
0
/** Garbage collect a Lua object.
 * \param L The Lua VM state.
 * \return The number of elements pushed on stack.
 */
gint
luaH_object_gc(lua_State *L) {
    lua_object_t *item = lua_touserdata(L, 1);
    if (item->signals)
        signal_destroy(item->signals);
    return 0;
}
示例#2
0
// copy_thread - setup the trapframe on the  process's kernel stack top and
//             - setup the kernel entry point and stack of process
static void
put_signal(struct proc_struct *proc) {
	struct signal_struct *sig = proc->signal_info.signal;
	if ( sig != NULL ) {
		if ( signal_count_dec(sig) == 0 ) {
			signal_destroy(sig);
		}
	}
	proc->signal_info.signal = NULL;
}
示例#3
0
static void signal_remove_from_list(SIGNAL_REC *rec, int signal_id,
				    int list, int index)
{
	if (rec->emitting) {
		g_ptr_array_index(rec->siglist[list], index) = NULL;
		rec->altered = TRUE;
	} else {
		g_ptr_array_remove_index(rec->siglist[list], index);
		g_ptr_array_remove_index(rec->modulelist[list], index);
		if (signal_is_emitlist_empty(rec))
			signal_destroy(signal_id);
	}
}