From c8e27adf1f357bf50d41744fde82738b50e1c214 Mon Sep 17 00:00:00 2001 From: tyx <462747508@qq.com> Date: Tue, 9 Jul 2019 21:34:56 +0800 Subject: [PATCH] =?UTF-8?q?[src][ipc]=E5=AE=8C=E5=96=84=20message=20queue?= =?UTF-8?q?=20=E7=9B=B8=E5=85=B3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/rtthread.h | 4 ++-- src/ipc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rtthread.h b/include/rtthread.h index 955ea51c50..04db77da46 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -378,8 +378,8 @@ rt_mq_t rt_mq_create(const char *name, rt_uint8_t flag); rt_err_t rt_mq_delete(rt_mq_t mq); -rt_err_t rt_mq_send(rt_mq_t mq, void *buffer, rt_size_t size); -rt_err_t rt_mq_urgent(rt_mq_t mq, void *buffer, rt_size_t size); +rt_err_t rt_mq_send(rt_mq_t mq, const void *buffer, rt_size_t size); +rt_err_t rt_mq_urgent(rt_mq_t mq, const void *buffer, rt_size_t size); rt_err_t rt_mq_recv(rt_mq_t mq, void *buffer, rt_size_t size, diff --git a/src/ipc.c b/src/ipc.c index e293eee8cd..39cf217baa 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1960,7 +1960,7 @@ RTM_EXPORT(rt_mq_delete); * * @return the error code */ -rt_err_t rt_mq_send(rt_mq_t mq, void *buffer, rt_size_t size) +rt_err_t rt_mq_send(rt_mq_t mq, const void *buffer, rt_size_t size) { register rt_ubase_t temp; struct rt_mq_message *msg; @@ -2050,7 +2050,7 @@ RTM_EXPORT(rt_mq_send); * * @return the error code */ -rt_err_t rt_mq_urgent(rt_mq_t mq, void *buffer, rt_size_t size) +rt_err_t rt_mq_urgent(rt_mq_t mq, const void *buffer, rt_size_t size) { register rt_ubase_t temp; struct rt_mq_message *msg;