PAL A Platform Abstraction Layer connects the mbed-client with the underlying platform.

- Main Page
- Data Structures
- Files

- File List
- Globals

pal_rtos_test_utils.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef _PAL_RTOS_TEST_UTILS_H
18 #define _PAL_RTOS_TEST_UTILS_H
19
20 #include "pal_types.h"
21 #include "pal_rtos.h"
22 #include "pal_test_utils.h"
23
24 #define THREAD_STACK_SIZE 1024*sizeof(uint32_t)
25
26 typedef struct threadsArgument{
27 uint32_t arg1;
28 uint32_t arg2;
29 uint32_t arg3;
30 uint32_t arg4;
31 uint32_t arg5;
32 uint32_t arg6;
33 uint32_t arg7;
34 }threadsArgument_t;
35
36
37 extern threadsArgument_t g_threadsArg;
38
39 extern uint32_t g_threadStorage[20];
40
41 void palThreadFunc1(void const *argument);
42 void palThreadFunc2(void const *argument);
43 void palThreadFunc3(void const *argument);
44 void palThreadFunc4(void const *argument);
45 void palThreadFunc5(void const *argument);
46 void palThreadFunc6(void const *argument);
47
48
49 typedef struct timerArgument{
50 uint32_t ticksBeforeTimer;
51 uint32_t ticksInFunc1;
52 uint32_t ticksInFunc2;
53 }timerArgument_t;
54
55 extern timerArgument_t g_timerArgs;
56
57 void palTimerFunc1(void const *argument);
58 void palTimerFunc2(void const *argument);
59
60
61 void palThreadFuncCustom1(void const *argument);
62 void palThreadFuncCustom2(void const *argument);
63 void palThreadFuncCustom3(void const *argument);
64 void palThreadFuncCustom4(void const *argument);
65
66
67 #define MEMORY_POOL1_BLOCK_SIZE 32
68 #define MEMORY_POOL1_BLOCK_COUNT 5
69 #define MEMORY_POOL2_BLOCK_SIZE 12
70 #define MEMORY_POOL2_BLOCK_COUNT 4
71
72 extern palMutexID_t mutex1;
73 extern palMutexID_t mutex2;
74
75 extern palSemaphoreID_t semaphore1;
76
77 #endif //_PAL_RTOS_TEST_UTILS_H
threadsArgument::arg1
uint32_t arg1
Definition: pal_rtos_test_utils.h:27
palSemaphoreID_t
uintptr_t palSemaphoreID_t
Definition: pal_rtos.h:37
palTimerFunc2
void palTimerFunc2(void const *argument)
Definition: pal_rtos_test_utils.c:207
timerArgument_t
struct timerArgument timerArgument_t
threadsArgument::arg5
uint32_t arg5
Definition: pal_rtos_test_utils.h:31
threadsArgument_t
struct threadsArgument threadsArgument_t
mutex1
palMutexID_t mutex1
Definition: pal_rtos_test.c:33
palThreadFuncCustom3
void palThreadFuncCustom3(void const *argument)
Definition: pal_rtos_test_utils.c:224
threadsArgument::arg3
uint32_t arg3
Definition: pal_rtos_test_utils.h:29
palThreadFuncCustom2
void palThreadFuncCustom2(void const *argument)
Definition: pal_rtos_test_utils.c:219
g_threadsArg
threadsArgument_t g_threadsArg
Definition: pal_rtos_test.c:31
g_threadStorage
uint32_t g_threadStorage[20]
Definition: pal_rtos_test.c:30
pal_test_utils.h
threadsArgument
Definition: pal_rtos_test_utils.h:26
mutex2
palMutexID_t mutex2
Definition: pal_rtos_test.c:34
pal_rtos.h
palThreadFuncCustom1
void palThreadFuncCustom1(void const *argument)
Definition: pal_rtos_test_utils.c:214
threadsArgument::arg2
uint32_t arg2
Definition: pal_rtos_test_utils.h:28
palMutexID_t
uintptr_t palMutexID_t
Definition: pal_rtos.h:36
timerArgument::ticksInFunc2
uint32_t ticksInFunc2
Definition: pal_rtos_test_utils.h:52
palThreadFunc2
void palThreadFunc2(void const *argument)
Definition: pal_rtos_test_utils.c:60
timerArgument
Definition: pal_rtos_test_utils.h:49
palThreadFunc4
void palThreadFunc4(void const *argument)
Definition: pal_rtos_test_utils.c:123
timerArgument::ticksInFunc1
uint32_t ticksInFunc1
Definition: pal_rtos_test_utils.h:51
pal_types.h
g_timerArgs
timerArgument_t g_timerArgs
Definition: pal_rtos_test.c:32
semaphore1
palSemaphoreID_t semaphore1
Definition: pal_rtos_test.c:35
palThreadFunc5
void palThreadFunc5(void const *argument)
Definition: pal_rtos_test_utils.c:152
palThreadFuncCustom4
void palThreadFuncCustom4(void const *argument)
Definition: pal_rtos_test_utils.c:229
palThreadFunc1
void palThreadFunc1(void const *argument)
Definition: pal_rtos_test_utils.c:26
timerArgument::ticksBeforeTimer
uint32_t ticksBeforeTimer
Definition: pal_rtos_test_utils.h:50
palThreadFunc6
void palThreadFunc6(void const *argument)
Definition: pal_rtos_test_utils.c:175
threadsArgument::arg7
uint32_t arg7
Definition: pal_rtos_test_utils.h:33
threadsArgument::arg6
uint32_t arg6
Definition: pal_rtos_test_utils.h:32
threadsArgument::arg4
uint32_t arg4
Definition: pal_rtos_test_utils.h:30
palThreadFunc3
void palThreadFunc3(void const *argument)
Definition: pal_rtos_test_utils.c:85
palTimerFunc1
void palTimerFunc1(void const *argument)
Definition: pal_rtos_test_utils.c:200