los_queue.h文件参考

浏览该文件的源代码。


数据结构

struct   tagQueueInfo
  Structure of the block for queue information query 更多...

宏定义

#define  LOS_ERRNO_QUEUE_MAXNUM_ZERO   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x00)
  Queue error code: The maximum number of queue resources is configured to 0.
#define  LOS_ERRNO_QUEUE_NO_MEMORY   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x01)
  Queue error code: The queue block memory fails to be initialized.
#define  LOS_ERRNO_QUEUE_CREATE_NO_MEMORY   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x02)
  Queue error code: The memory for queue creation fails to be requested.
#define  LOS_ERRNO_QUEUE_SIZE_TOO_BIG   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x03)
  Queue error code: The size of the biggest message in the created queue is too big.
#define  LOS_ERRNO_QUEUE_CB_UNAVAILABLE   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x04)
  Queue error code: The upper limit of the number of created queues is exceeded.
#define  LOS_ERRNO_QUEUE_NOT_FOUND   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x05)
  Queue error code: Invalid queue.
#define  LOS_ERRNO_QUEUE_PEND_IN_LOCK   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x06)
  Queue error code: The task is forbidden to be blocked on a queue when the task is locked.
#define  LOS_ERRNO_QUEUE_TIMEOUT   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x07)
  Queue error code: The time set for waiting to processing the queue expires.
#define  LOS_ERRNO_QUEUE_IN_TSKUSE   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x08)
  Queue error code: The queue that blocks a task cannot be deleted.
#define  LOS_ERRNO_QUEUE_WRITE_IN_INTERRUPT   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x09)
  Queue error code: The queue cannot be written during an interrupt when the time for waiting to processing the queue expires.
#define  LOS_ERRNO_QUEUE_NOT_CREATE   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0a)
  Queue error code: The queue is not created.
#define  LOS_ERRNO_QUEUE_IN_TSKWRITE   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0b)
  Queue error code: Queue reading and writing are not synchronous.
#define  LOS_ERRNO_QUEUE_CREAT_PTR_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0c)
  Queue error code: Parameters passed in during queue creation are null pointers.
#define  LOS_ERRNO_QUEUE_PARA_ISZERO   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0d)
  Queue error code: The queue length or message node size passed in during queue creation is 0.
#define  LOS_ERRNO_QUEUE_INVALID   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0e)
  Queue error code: The handle of the queue is invalid.
#define  LOS_ERRNO_QUEUE_READ_PTR_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x0f)
  Queue error code: The pointer passed in during queue reading is null.
#define  LOS_ERRNO_QUEUE_READSIZE_ISZERO   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x10)
  Queue error code: The buffer size passed in during queue reading is 0.
#define  LOS_ERRNO_QUEUE_WRITE_PTR_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x12)
  Queue error code: The pointer passed in during queue writing is null.
#define  LOS_ERRNO_QUEUE_WRITESIZE_ISZERO   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x13)
  Queue error code: The buffer size passed in during queue writing is 0.
#define  LOS_ERRNO_QUEUE_WRITE_SIZE_TOO_BIG   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x15)
  Queue error code: The buffer size passed in during queue writing is bigger than the queue size.
#define  LOS_ERRNO_QUEUE_ISFULL   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x16)
  Queue error code: No free node is available during queue writing.
#define  LOS_ERRNO_QUEUE_PTR_NULL   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x17)
  Queue error code: The pointer passed in when the queue information is being obtained is null.
#define  LOS_ERRNO_QUEUE_READ_IN_INTERRUPT   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x18)
  Queue error code: The queue cannot be read during an interrupt when the time for waiting to processing the queue expires.
#define  LOS_ERRNO_QUEUE_MAIL_HANDLE_INVALID   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x19)
  Queue error code: The handle of the queue passed-in when the memory for the queue is being freed is invalid.
#define  LOS_ERRNO_QUEUE_MAIL_PTR_INVALID   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x1a)
  Queue error code: The pointer to the memory to be freed is null.
#define  LOS_ERRNO_QUEUE_MAIL_FREE_ERROR   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x1b)
  Queue error code: The memory for the queue fails to be freed.
#define  LOS_ERRNO_QUEUE_ISEMPTY   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x1d)
  Queue error code: No resource is in the queue that is being read when the time for waiting to processing the queue expires.
#define  LOS_ERRNO_QUEUE_READ_SIZE_TOO_SMALL   LOS_ERRNO_OS_ERROR(LOS_MOD_QUE, 0x1f)
  Queue error code: The buffer size passed in during queue readding is smaller than the queue size.

类型定义

typedef struct tagQueueInfo  QUEUE_INFO_S
  Structure of the block for queue information query

函数

UINT32  LOS_QueueCreate (CHAR *pcQueueName, UINT16 usLen, UINT32 *puwQueueID, UINT32 uwFlags, UINT16 usMaxMsgSize)
  Create a message queue.
UINT32  LOS_QueueReadCopy (UINT32 uwQueueID, VOID *pBufferAddr, UINT32 *puwBufferSize, UINT32 uwTimeOut)
  Read a queue.
UINT32  LOS_QueueWriteCopy (UINT32 uwQueueID, VOID *pBufferAddr, UINT32 uwBufferSize, UINT32 uwTimeOut)
  Write data into a queue.
UINT32  LOS_QueueRead (UINT32 uwQueueID, VOID *pBufferAddr, UINT32 uwBufferSize, UINT32 uwTimeOut)
  Read a queue.
UINT32  LOS_QueueWrite (UINT32 uwQueueID, VOID *pBufferAddr, UINT32 uwBufferSize, UINT32 uwTimeOut)
  Write data into a queue.
UINT32  LOS_QueueWriteHead (UINT32 uwQueueID, VOID *pBufferAddr, UINT32 uwBufferSize, UINT32 uwTimeOut)
  Write data into a queue header.
UINT32  LOS_QueueWriteHeadCopy (UINT32 uwQueueID, VOID *pBufferAddr, UINT32 uwBufferSize, UINT32 uwTimeOut)
  Write data into a queue header.
UINT32  LOS_QueueDelete (UINT32 uwQueueID)
  Delete a queue.
UINT32  LOS_QueueInfoGet (UINT32 uwQueueID, QUEUE_INFO_S *pstQueueInfo)
  Obtain queue information.