From: Jérémie Astor Date: Sun, 15 Dec 2019 11:51:25 +0000 (+0100) Subject: :art: Add vm_ini_shred X-Git-Tag: nightly~1986 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=bf79f1c6b3c5c0df176b2876ad8f914285d0bd18;p=gwion.git :art: Add vm_ini_shred --- 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));