VSF Documented
Data Fields
vk_reentrant_mal_t Class Reference

#include <vsf_mal.h>

Data Fields

vk_mal_t vk_mal_tmal
 
vsf_mutex_tmutex
 
uint64_t offset
 

Detailed Description

reentrant mal class

Note
Normally, a mal instance is not reentrant. Follow the steps to get multiple mal instance which is protect with a common mutex.
  1. prepare a common mutex instance for malA
  2. in each task which will asscess malA, implement a vk_reentrant_mal_t instance. mal member points to malA, mutex member points to the common mutex in step 1, offset member is the byte offset in malA, size member of vk_mal_t is the size of the reentrant mal instance.
  3. each vk_reentrant_mal_t instance in each task will be protected by the common mutex.

Field Documentation

◆ mal

vk_mal_t vk_mal_t* vk_reentrant_mal_t::mal

◆ mutex

vsf_mutex_t* vk_reentrant_mal_t::mutex

◆ offset

uint64_t vk_reentrant_mal_t::offset