vm: add assertions to tls_vm()
parent
805fea33cb
commit
96df486753
|
@ -33,7 +33,9 @@ void register_vm_with_thread(factor_vm *vm)
|
||||||
|
|
||||||
factor_vm *tls_vm()
|
factor_vm *tls_vm()
|
||||||
{
|
{
|
||||||
return (factor_vm*)pthread_getspecific(tlsKey);
|
factor_vm *vm = (factor_vm*)pthread_getspecific(tlsKey);
|
||||||
|
assert(vm != NULL);
|
||||||
|
return vm;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *null_dll;
|
static void *null_dll;
|
||||||
|
|
|
@ -23,7 +23,9 @@ void register_vm_with_thread(factor_vm *vm)
|
||||||
|
|
||||||
factor_vm *tls_vm()
|
factor_vm *tls_vm()
|
||||||
{
|
{
|
||||||
return (factor_vm*)TlsGetValue(dwTlsIndex);
|
factor_vm *vm = (factor_vm*)TlsGetValue(dwTlsIndex);
|
||||||
|
assert(vm != NULL);
|
||||||
|
return vm;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 current_micros()
|
s64 current_micros()
|
||||||
|
|
Loading…
Reference in New Issue