diff --git a/src/emu/ovni/event.c b/src/emu/ovni/event.c index bf97293..f1ee68f 100644 --- a/src/emu/ovni/event.c +++ b/src/emu/ovni/event.c @@ -35,10 +35,16 @@ pre_thread_execute(struct emu *emu, struct thread *th) dbg("thread %d runs in %s", th->tid, cpu->name); /* First set the CPU in the thread */ - thread_set_cpu(th, cpu); + if (thread_set_cpu(th, cpu) != 0) { + err("thread_set_cpu failed"); + return -1; + } /* Then set the thread to running state */ - thread_set_state(th, TH_ST_RUNNING); + if (thread_set_state(th, TH_ST_RUNNING) != 0) { + err("thread_set_state failed"); + return -1; + } /* And then add the thread to the CPU, so tracking channels see the * updated thread state */ diff --git a/src/emu/system.c b/src/emu/system.c index 106aac4..039821f 100644 --- a/src/emu/system.c +++ b/src/emu/system.c @@ -543,7 +543,10 @@ system_connect(struct system *sys, struct bay *bay, struct recorder *rec) return -1; } - cpu_add_to_pcf_type(cpu, affinity_type); + if (cpu_add_to_pcf_type(cpu, affinity_type) == NULL) { + err("cpu_add_to_pcf_type failed for cpu '%s'", cpu->name); + return -1; + } } return 0;