mtx_init method

int mtx_init(
  1. mtx_t mtx,
  2. int type
)

Initialize a mutex

Implementation

int mtx_init(mtx_t mtx, int type) {
  mtx.locked = false;
  mtx.type = type;
  return thrd_success;
}