Name
SPVM::Document::NativeAPI::Mutex - Mutex Native APIs
Description
The mutex native APIs of SPVM are the APIs to manipulate mutex.
Usage
SPVM_API_MUTEX* api_mutex = env->api->mutex;
void* mutex = api_mutex->new_instance();
api_mutex->free_instance(mutex);
Native APIs
new_instance
void* (*new_instance)(SPVM_ENV* env, SPVM_VALUE* stack);
Creates a new mutex object and returns it.
free_instance
void (*free_instance)(SPVM_ENV* env, SPVM_VALUE* stack, void* mutex);
Frees a mutex object.
lock
void (*lock)(SPVM_ENV* env, SPVM_VALUE* stack, void* mutex);
unlock
void (*unlock)(SPVM_ENV* env, SPVM_VALUE* stack, void* mutex);
reader_lock
void (*reader_lock)(SPVM_ENV* env, SPVM_VALUE* stack, void* mutex);
reader_unlock
void (*reader_unlock)(SPVM_ENV* env, SPVM_VALUE* stack, void* mutex);
Native API IDs
0 new_instance
1 free_instance
2 lock
3 unlock
4 reader_lock
5 reader_unlock
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License