提供AliOS Things系统内核消息队列功能的基础API.
◆ aos_queue_t
◆ aos_queue_create()
This function will create a queue.
- 参数
-
[in] | queue | pointer to the queue(the space is provided by user). |
[in] | size | the bytes of the buf. |
[in] | max_msg | the max size of the msg. |
[in] | options | reserved. |
- 返回
- 0: success.
◆ aos_queue_free()
This function will delete a queue.
- 参数
-
[in] | queue | pointer to the queue. |
◆ aos_queue_get_count()
Get number of queued messages in a message queue.
- 参数
-
[in] | queue | message queue handle to operate. |
- 返回
- number of queued messages.negative indicates error code.
◆ aos_queue_recv()
This function will receive msg from a queue.
- 参数
-
[in] | queue | pointer to the queue. |
[in] | ms | ms to wait before receive. |
[out] | msg | buf to save msg. |
[out] | size | size of the msg. |
- 返回
- 0: success.
◆ aos_queue_send()
This function will send a msg to the front of a queue.
- 参数
-
[in] | queue | pointer to the queue. |
[in] | msg | msg to send. |
[in] | size | size of the msg. |
- 返回
- 0: success.