Lines Matching refs:queue

6queue, also called a message queue, is a data structure used for communication between tasks. The 
8queue. When the queue has no messages, the tasks are suspended. When the queue has a new message, …
10 …ad queue and write queue to adjust the block mode of the read and write APIs. If the timeout perio…
12 An asynchronous processing mechanism is provided to allow messages in a queue not to be processed i…
16 - Both the read queue and write queue support the timeout mechanism.
20 …tion. Messages of different lengths (not exceeding the message node size of the queue) are allowed.
22 - A task can receive messages from and send messages to any message queue.
24 - Multiple tasks can receive messages from and send messages to the same queue.
26 - When a queue is created, the required dynamic memory space is automatically allocated in the queu…
37 * Data structure of the queue control block
40 UINT8 *queueHandle; /**< Pointer to a queue handle */
53 Each queue control block contains information about the queue status.
55 - **OS_QUEUE_UNUSED**: The queue is not in use.
57 - **OS_QUEUE_INUSED**: The queue is in use.
62 - The queue ID is returned when a queue is created successfully.
64queue control block contains **Head** and **Tail**, which indicate the storage status of messages …
66queue, **readWriteableCnt[1]** is used to determine whether data can be written to the queue. If *…
68queue is to be read, **readWriteableCnt[0]** is used to determine whether the queue has messages t…
70queue is to be deleted, the system locates the queue based on the queue ID, sets the queue status …
72 **Figure 1** Reading and writing data in a queue
74 ![](figures/reading-and-writing-data-in-a-queue-3.png "reading-and-writing-data-in-a-queue-3")
86 …ge queue| - **LOS_QueueCreate**: creates a message queue. The system dynamically allocates the que…
87queue| - **LOS_QueueRead**: reads data in the head node of the specified queue. The data in the qu…
88queue| - **LOS_QueueReadCopy**: reads data from the head node of a queue.<br>- **LOS_QueueWriteCop…
89 | Obtaining queue information| **LOS_QueueInfoGet**: obtains queue information, including the queue
94 1. Call **LOS_QueueCreate** to create a queue. The queue ID is returned when the queue is created.
96 2. Call **LOS_QueueWrite** or **LOS_QueueWriteCopy** to write data to the queue.
98 3. Call **LOS_QueueRead** or **LOS_QueueReadCopy** to read data from the queue.
100 4. Call **LOS_QueueInfoGet** to obtain queue information.
102 5. Call **LOS_QueueDelete** to delete a queue.
105queue resources of the system, not the number of queue resources available to users. For example, …
107 > - The queue name and flags passed in when a queue is created are reserved for future use.
109 > - The parameter **timeOut** in the queue function is relative time.
113 …calling **LOS_QueueRead** is not modified or released abnormally when the queue is being read. Oth…
117 …hese APIs, ensure that the message node size is the pointer length during queue creation, to avoid…
125 Create a queue and two tasks. Enable task 1 to write data to the queue, and task 2 to read data fro…
129 2. Call **LOS_QueueCreate** to create a message queue.
135 5. Call **LOS_QueueDelete** to delete the queue.
180 dprintf("delete the queue failure, error: %x\n", ret);
183 dprintf("delete the queue success!\n");
188 dprintf("start queue example\n");
193 ret = LOS_QueueCreate("queue", 5, &g_queue, 0, 50);
195 dprintf("create queue failure, error: %x\n", ret);
198 dprintf("create the queue success!\n");
235 start queue example
236 create the queue success!
238 delete the queue success!