added hcl_abort()

taken out vm_startup and vm_cleanup from hcl_vmprim_t and moved them to hcl_cb_t
This commit is contained in:
2018-03-10 17:53:44 +00:00
parent 986e02ae69
commit 536f7fd9f2
4 changed files with 279 additions and 164 deletions

View File

@ -415,6 +415,8 @@ hcl_cb_t* hcl_regcb (hcl_t* hcl, hcl_cb_t* tmpl)
actual->next = hcl->cblist;
actual->prev = HCL_NULL;
hcl->cblist = actual;
if (actual->vm_checkpoint) hcl->vm_checkpoint_cb_count++;
return actual;
}
@ -432,6 +434,11 @@ void hcl_deregcb (hcl_t* hcl, hcl_cb_t* cb)
if (cb->prev) cb->prev->next = cb->next;
}
if (cb->vm_checkpoint)
{
HCL_ASSERT (hcl, hcl->vm_checkpoint_cb_count > 0);
hcl->vm_checkpoint_cb_count--;
}
hcl_freemem (hcl, cb);
}