vm: fix typos

release
Slava Pestov 2010-03-29 02:27:45 -04:00
parent 43b2e02534
commit 946b7415e0
3 changed files with 6 additions and 4 deletions

View File

@ -3,7 +3,7 @@
namespace factor namespace factor
{ {
pthread_key_t current_vm_tls_key = 0; pthread_key_t current_vm_tls_key;
void init_mvm() void init_mvm()
{ {

View File

@ -7,13 +7,13 @@ DWORD current_vm_tls_key;
void init_mvm() void init_mvm()
{ {
if ((current_vm_tls_key = TlsAlloc()) == TLS_OUT_OF_INDEXES) if((current_vm_tls_key = TlsAlloc()) == TLS_OUT_OF_INDEXES)
fatal_error("TlsAlloc() failed",0); fatal_error("TlsAlloc() failed",0);
} }
void register_vm_with_thread(factor_vm *vm) void register_vm_with_thread(factor_vm *vm)
{ {
if (!TlsSetValue(current_vm_tls_key, vm)) if(!TlsSetValue(current_vm_tls_key, vm))
fatal_error("TlsSetValue() failed",0); fatal_error("TlsSetValue() failed",0);
} }

View File

@ -1,8 +1,10 @@
#include "master.cpp" #include "master.hpp"
namespace factor namespace factor
{ {
std::map<THREADHANDLE, factor_vm*> thread_vms;
struct startargs { struct startargs {
int argc; int argc;
vm_char **argv; vm_char **argv;