SmartSnippets DA1459x SDK
Data Structures | Macros | Typedefs | Functions

Message queue API. More...

#include <osal.h>

Go to the source code of this file.

Data Structures

struct  content_allocator
 Message queue content allocator. More...
 
struct  msq_queue
 Message queue structure. More...
 
struct  msg
 Structure for messages with id, type, data. More...
 

Macros

#define MSG_QUEUE_MALLOC   OS_MALLOC_FUNC
 Default memory allocation function for queues. More...
 
#define MSG_QUEUE_FREE   OS_FREE_FUNC
 Default memory free function for queues. More...
 

Typedefs

typedef uint16_t MSG_SIZE
 
typedef uint16_t MSG_ID
 
typedef uint16_t MSG_TYPE
 
typedef void(* MSG_FREE) (void *)
 
typedef void *(* MSG_ALLOC) (size_t)
 
typedef struct content_allocator content_allocator
 Message queue content allocator. More...
 
typedef struct msq_queue msg_queue
 Message queue structure. More...
 
typedef struct msg msg
 Structure for messages with id, type, data. More...
 

Functions

void msg_queue_create (msg_queue *queue, int queue_size, content_allocator *allocator)
 Create message queue. More...
 
void msg_queue_delete (msg_queue *queue)
 Delete message queue. More...
 
int msg_queue_put (msg_queue *queue, msg *msg, OS_TICK_TIME timeout)
 Put message in queue. More...
 
int msg_queue_get (msg_queue *queue, msg *msg, OS_TICK_TIME timeout)
 Get message from queue. More...
 
void msg_init (msg *msg, MSG_ID id, MSG_TYPE type, void *buf, MSG_SIZE size, MSG_FREE free_cb)
 Prepare message with freeing callback. More...
 
void msg_release (msg *msg)
 Release message data. More...
 
int msg_queue_init_msg (msg_queue *queue, msg *msg, MSG_ID id, MSG_TYPE type, MSG_SIZE size)
 Initialize message with queue specific freeing callback. More...
 
int msg_queue_send (msg_queue *queue, MSG_ID id, MSG_TYPE type, void *buf, MSG_SIZE size, OS_TICK_TIME timeout)
 Send data to queue. More...
 
int msq_queue_send_zero_copy (msg_queue *queue, MSG_ID id, MSG_TYPE type, void *buf, MSG_SIZE size, OS_TICK_TIME timeout, MSG_FREE free_cb)
 Send data to queue with zero copy. More...
 

Detailed Description

Message queue API.

Copyright (C) 2015-2023 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.

This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.

THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.