changed the position of abortion check

This commit is contained in:
2018-03-11 03:05:42 +00:00
parent 536f7fd9f2
commit f9e60cea28
2 changed files with 15 additions and 5 deletions

View File

@ -416,6 +416,10 @@ hcl_cb_t* hcl_regcb (hcl_t* hcl, hcl_cb_t* tmpl)
actual->prev = HCL_NULL;
hcl->cblist = actual;
/* vm_checkpoint is invoked very frequently.
* and there might be multiple vm_checkpoint callbacks registered.
* keeping the count of vm_checkpoint callbacks registered
* speeds up the check */
if (actual->vm_checkpoint) hcl->vm_checkpoint_cb_count++;
return actual;