Lines Matching refs:queue
6 …queue, also called a queue, is a mechanism for communication between tasks. The queue receives mes…
8 …queue. When the queue has no messages, the read task is suspended. When the queue has a new messag…
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…
15 - Both the read queue and write queue support the timeout mechanism.
17 …tion. Messages of different lengths (not exceeding the message node size of the queue) are allowed.
18 - A task can receive messages from and send messages to any message queue.
19 - Multiple tasks can receive messages from and send messages to the same queue.
21 - The space required for creating a static queue is passed in by the user. When the static queue is…
28 …ialization of a queue, a control block, containing the queue name and status, is allocated. The co…
30 The data structure of the queue control block is as follows:
36 UINT8 *queue; /* Pointer to the memory space of the queue */
39 …Len; /* Number of message nodes in the queue, that is, the queue length */
44 …ose array subscript is 0 indicates the number of readable messages in the queue, …
45 … The element whose array subscript is 1 indicates the number of writable messages in the queue */
52 Each queue control block contains information about the queue status.
54 - **OS_QUEUE_UNUSED**: The queue is not in use.
56 - **OS_QUEUE_INUSED**: The queue is in use.
61 - The queue ID is returned when a queue is created successfully.
63 …queue control block contains **Head** and **Tail**, which indicate the storage status of messages …
65 …queue, **readWriteableCnt[1]** is used to determine whether data can be written to the queue. If *…
67 …queue is to be read, **readWriteableCnt[0]** is used to determine whether the queue has messages t…
69 …queue is to be deleted, the system locates the queue based on the queue ID, sets the queue status …
71 **Figure 1** Reading and writing data in a queue
73 
82 …queue| **LOS_QueueCreate**: creates a message queue. The system dynamically allocates the queue sp…
83 …queue| **LOS_QueueRead**: reads data in the head node of the specified queue. The data in the queu…
84 …queue| **LOS_QueueReadCopy**: reads data from the head node of a specified queue.<br>**LOS_QueueWr…
85 | Obtaining queue information| **LOS_QueueInfoGet**: obtains queue information, including the queue…
90 1. Call **LOS_QueueCreate** to create a queue. The queue ID is returned when the queue is created.
92 2. Call **LOS_QueueWrite** or **LOS_QueueWriteCopy** to write data to the queue.
94 3. Call **LOS_QueueRead** or **LOS_QueueReadCopy** to read data from the queue.
96 4. Call **LOS_QueueInfoGet** to obtain queue information.
98 5. Call **LOS_QueueDelete** to delete a queue.
102 …queue resources of the system, not the number of queue resources available to users. For example, …
104 > - The input parameters queue name and flags passed when a queue is created are reserved for futur…
106 > - The input parameter **timeOut** in the queue interface function is relative time.
110 …calling **LOS_QueueRead** is not modified or released abnormally when the queue is being read. Oth…
114 …hese APIs, ensure that the message node size is the pointer length during queue creation, to avoid…
122 Create a queue and two tasks. Enable task 1 to write data to the queue, and task 2 to read data fro…
126 2. Call **LOS_QueueCreate** to create a message queue.
132 5. Call **LOS_QueueDelete** to delete the queue.
178 printf("delete the queue failure, error: %x\n", ret);
181 printf("delete the queue success.\n");
186 printf("start queue example.\n");
215 ret = LOS_QueueCreate("queue", 5, &g_queue, 0, 50);
217 printf("create queue failure, error: %x\n", ret);
220 printf("create the queue success.\n");
234 start queue example.
235 create the queue success.
237 delete the queue success.