1 /*
2  * Copyright 2018, NXP
3  * All rights reserved.
4  *
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef __SRTM_MESSAGE_POOL_H__
10 #define __SRTM_MESSAGE_POOL_H__
11 
12 #include <srtm_defs.h>
13 
14 /*!
15  * @addtogroup srtm
16  * @{
17  */
18 
19 /*******************************************************************************
20  * Definitions
21  ******************************************************************************/
22 
23 /*******************************************************************************
24  * API
25  ******************************************************************************/
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /*!
31  * @brief Allocate a message with specific size.
32  *
33  * @param size message size to allocate.
34  *
35  * @return allocated message address.
36  */
37 void *SRTM_MessagePool_Alloc(uint32_t size);
38 
39 /*!
40  * @brief Free the allocated message.
41  *
42  * @param buf the address of the allocated message
43  */
44 void SRTM_MessagePool_Free(void *buf);
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 /*! @} */
51 
52 #endif /* __SRTM_MESSAGE_POOL_H__ */
53