From bf79f1c6b3c5c0df176b2876ad8f914285d0bd18 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 15 Dec 2019 12:51:25 +0100 Subject: [PATCH] :art: Add vm_ini_shred --- src/vm/vm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vm/vm.c b/src/vm/vm.c index e61cb85a..eb165a3d 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -68,6 +68,12 @@ ANN void vm_add_shred(const VM* vm, const VM_Shred shred) { shreduler_add(vm->shreduler, shred); } +ANN void vm_ini_shred(const VM* vm, const VM_Shred shred) { + shred->info->vm = (VM*)vm; + shred->info->me = new_shred(shred, 1); + shreduler_ini(vm->shreduler, shred); +} + ANN void vm_lock(VM const *vm) { do MUTEX_LOCK(vm->shreduler->mutex); while((vm = vm->parent)); -- 2.43.0