]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/os-unix.cpp
vm: split up TLS code and add a dummy implementation for a dummy OS known as NetBSD
[factor.git] / vm / os-unix.cpp
index a724007b1a62576fc7ec88168be622503b2eb267..a8898eccab3264423ad1e25de1b8b97f0341f138 100644 (file)
@@ -17,26 +17,6 @@ THREADHANDLE start_thread(void *(*start_routine)(void *),void *args)
        return thread;
 }
 
-pthread_key_t current_vm_tls_key = 0;
-
-void init_platform_globals()
-{
-       if(pthread_key_create(&current_vm_tls_key, NULL) != 0)
-               fatal_error("pthread_key_create() failed",0);
-}
-
-void register_vm_with_thread(factor_vm *vm)
-{
-       pthread_setspecific(current_vm_tls_key,vm);
-}
-
-factor_vm *current_vm()
-{
-       factor_vm *vm = (factor_vm*)pthread_getspecific(current_vm_tls_key);
-       assert(vm != NULL);
-       return vm;
-}
-
 static void *null_dll;
 
 u64 system_micros()