test/dummy_libs/synch/kernel_mutexes.dummy.cpp
// Initialize a mutex object. The owner of the mutex object is responsible for managing the memory associated with it.
Initialize a mutex object. The owner of the mutex object is responsible for managing the memory associated with it.
Initialize a mutex object . The owner of the mutex object is responsible for managing the memory associated with it .
void klib_synch_mutex_init(klib_mutex &mutex)
{
  KL_TRC_ENTRY;
  klib_synch_spinlock_init(mutex.access_lock);
  klib_synch_spinlock_lock(mutex.access_lock);
  mutex.mutex_locked = false;
  mutex.owner_thread = nullptr;
  klib_list_initialize(&mutex.waiting_threads_list);
  klib_synch_spinlock_unlock(mutex.access_lock);
  mutex_map[&mutex] = std::make_unique<std::mutex>();
  KL_TRC_EXIT;
}
void klib_synch_mutex_init ( klib_mutex & mutex ) { KL_TRC_ENTRY ; klib_synch_spinlock_init ( mutex . access_lock ) ; klib_synch_spinlock_lock ( mutex . access_lock ) ; mutex . mutex_locked = false ; mutex . owner_thread = nullptr ; klib_list_initialize ( & mutex . waiting_threads_list ) ; klib_synch_spinlock_unlock ( mutex . access_lock ) ; mutex_map [ & mutex ] = std :: make_unique < std :: mutex > ( ) ; KL_TRC_EXIT ; }
Initialize a mutex object.
Initialize a mutex object .