Mistake on this page?
Report an issue in GitHub or email us
mbed_rtos_storage.h
1 /* mbed Microcontroller Library
2  * Copyright (c) 2006-2017 ARM Limited
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20  * SOFTWARE.
21  */
22 #ifndef MBED_RTOS_STORAGE_H
23 #define MBED_RTOS_STORAGE_H
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /** \addtogroup rtos */
30 /** @{*/
31 
32 /** @brief RTOS primitives storage types for RTX
33 
34  Types defined in this file should be utilized, when the direct RTOS C API usage is required, to provide backing memory
35  for internal RTX data. Allocated object should be wrapped in attribute struct and passed to os*New call, for details
36  see CMSIS-RTOS2 documentation.
37 
38  @note
39  This file breaks abstraction layers and uses RTX internal types, but it limits the contamination to single, RTOS
40  implementation specific, header file, therefore limiting scope of possible changes.
41  */
42 
43 #include "rtx_os.h"
44 #include "mbed_rtx_conf.h"
45 
46 typedef osRtxMutex_t mbed_rtos_storage_mutex_t;
47 typedef osRtxSemaphore_t mbed_rtos_storage_semaphore_t;
48 typedef osRtxThread_t mbed_rtos_storage_thread_t;
49 typedef osRtxMemoryPool_t mbed_rtos_storage_mem_pool_t;
50 typedef osRtxMessageQueue_t mbed_rtos_storage_msg_queue_t;
51 typedef osRtxEventFlags_t mbed_rtos_storage_event_flags_t;
52 typedef osRtxMessage_t mbed_rtos_storage_message_t;
53 typedef osRtxTimer_t mbed_rtos_storage_timer_t;
54 
55 #define MBED_RTOS_STORAGE_MEM_POOL_MEM_SIZE(block_count, block_size) \
56  osRtxMemoryPoolMemSize(block_count, block_size)
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif
63 
64 /** @}*/
osRtxMutex_t mbed_rtos_storage_mutex_t
RTOS primitives storage types for RTX.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.