Revert "lists: Add list literal doc example."
[factor.git] / vm / mvm-unix.cpp
blob11261fe9ccf89437f49011f24d6526c48d00416a
1 #include "master.hpp"
3 namespace factor {
5 pthread_key_t current_vm_tls_key;
7 void init_mvm() {
8 if (pthread_key_create(&current_vm_tls_key, NULL) != 0)
9 fatal_error("pthread_key_create() failed", 0);
12 void register_vm_with_thread(factor_vm* vm) {
13 pthread_setspecific(current_vm_tls_key, vm);
16 factor_vm* current_vm_p() {
17 return (factor_vm*)pthread_getspecific(current_vm_tls_key);