PAL
A Platform Abstraction Layer connects the mbed-client with the underlying platform.
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;
35 
36 
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;
54 
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 
76 
77 #endif //_PAL_RTOS_TEST_UTILS_H
uint32_t arg1
Definition: pal_rtos_test_utils.h:27
uintptr_t palSemaphoreID_t
Definition: pal_rtos.h:37
void palTimerFunc2(void const *argument)
Definition: pal_rtos_test_utils.c:207
struct timerArgument timerArgument_t
uint32_t arg5
Definition: pal_rtos_test_utils.h:31
struct threadsArgument threadsArgument_t
palMutexID_t mutex1
Definition: pal_rtos_test.c:33
void palThreadFuncCustom3(void const *argument)
Definition: pal_rtos_test_utils.c:224
uint32_t arg3
Definition: pal_rtos_test_utils.h:29
void palThreadFuncCustom2(void const *argument)
Definition: pal_rtos_test_utils.c:219
threadsArgument_t g_threadsArg
Definition: pal_rtos_test.c:31
uint32_t g_threadStorage[20]
Definition: pal_rtos_test.c:30
Definition: pal_rtos_test_utils.h:26
palMutexID_t mutex2
Definition: pal_rtos_test.c:34
void palThreadFuncCustom1(void const *argument)
Definition: pal_rtos_test_utils.c:214
uint32_t arg2
Definition: pal_rtos_test_utils.h:28
uintptr_t palMutexID_t
Definition: pal_rtos.h:36
uint32_t ticksInFunc2
Definition: pal_rtos_test_utils.h:52
void palThreadFunc2(void const *argument)
Definition: pal_rtos_test_utils.c:60
Definition: pal_rtos_test_utils.h:49
void palThreadFunc4(void const *argument)
Definition: pal_rtos_test_utils.c:123
uint32_t ticksInFunc1
Definition: pal_rtos_test_utils.h:51
timerArgument_t g_timerArgs
Definition: pal_rtos_test.c:32
palSemaphoreID_t semaphore1
Definition: pal_rtos_test.c:35
void palThreadFunc5(void const *argument)
Definition: pal_rtos_test_utils.c:152
void palThreadFuncCustom4(void const *argument)
Definition: pal_rtos_test_utils.c:229
void palThreadFunc1(void const *argument)
Definition: pal_rtos_test_utils.c:26
uint32_t ticksBeforeTimer
Definition: pal_rtos_test_utils.h:50
void palThreadFunc6(void const *argument)
Definition: pal_rtos_test_utils.c:175
uint32_t arg7
Definition: pal_rtos_test_utils.h:33
uint32_t arg6
Definition: pal_rtos_test_utils.h:32
uint32_t arg4
Definition: pal_rtos_test_utils.h:30
void palThreadFunc3(void const *argument)
Definition: pal_rtos_test_utils.c:85
void palTimerFunc1(void const *argument)
Definition: pal_rtos_test_utils.c:200