From fbb78ae22d8ad4d755679281cc95dcee3384c0c9 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 22 Jul 2024 16:42:23 +0200 Subject: [PATCH] Avoid initialization of mark channels without types There is no need to create any channel or connect any channel to the PRV output. --- src/emu/ovni/mark.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/emu/ovni/mark.c b/src/emu/ovni/mark.c index ff2f340..69908be 100644 --- a/src/emu/ovni/mark.c +++ b/src/emu/ovni/mark.c @@ -387,6 +387,9 @@ mark_create(struct emu *emu) } } + if (memu->ntypes == 0) + return 0; + for (struct thread *th = emu->system.threads; th; th = th->gnext) { if (create_thread_chan(memu, &emu->bay, th) != 0) { err("create_thread_chan failed"); @@ -591,6 +594,12 @@ connect_cpu(struct emu *emu) int mark_connect(struct emu *emu) { + struct ovni_emu *oemu = EXT(emu, 'O'); + struct ovni_mark_emu *memu = &oemu->mark; + + if (memu->ntypes == 0) + return 0; + if (connect_thread(emu) != 0) { err("connect_thread() failed"); return -1;