UINT32 LOS_MuxCreate ( UINT32 puwMuxHandle  ) 

Create a mutex.

Description:
This API is used to create a mutex. A mutex handle is assigned to puwMuxHandle when the mutex is created successfully. Return LOS_OK on creating successful, return specific error code otherwise.
注意:
  • The total number of mutexes is pre-configured. If there are no available mutexes, the mutex creation fails.
参数:
参数名称 描述
puwMuxHandle  [OUT] Handle pointer of the successfully created mutex. The value of handle should be in [0, LOSCFG_BASE_IPC_MUX_LIMIT - 1].
返回值:
返回值 描述
LOS_ERRNO_MUX_PTR_NULL  The puwMuxHandle pointer is NULL.
LOS_ERRNO_MUX_ALL_BUSY  No available mutex.
LOS_OK  The mutex is successfully created.
Dependency:
  • los_mux.h: the header file that contains the API declaration.
参见:
LOS_MuxDelete
自从:
Huawei LiteOS V100R001C00