Skip to content

Commit 3923f3c

Browse files
authored
Merge pull request #2006 from sg-/single-thread-test-update
If a target is restricted to single threaded mode,
2 parents 047b3b2 + a30fac1 commit 3923f3c

File tree

17 files changed

+68
-0
lines changed

17 files changed

+68
-0
lines changed

libraries/tests/rtos/cmsis/basic/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "cmsis_os.h"
33

4+
#if defined(MBED_RTOS_SINGLE_THREAD)
5+
#error [NOT_SUPPORTED] test not supported
6+
#endif
7+
48
DigitalOut led1(LED1);
59
DigitalOut led2(LED2);
610

libraries/tests/rtos/cmsis/isr/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "rtos.h"
33

4+
#if defined(MBED_RTOS_SINGLE_THREAD)
5+
#error [NOT_SUPPORTED] test not supported
6+
#endif
7+
48
Queue<uint32_t, 5> queue;
59

610
DigitalOut myled(LED1);

libraries/tests/rtos/cmsis/mail/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "cmsis_os.h"
33

4+
#if defined(MBED_RTOS_SINGLE_THREAD)
5+
#error [NOT_SUPPORTED] test not supported
6+
#endif
7+
48
typedef struct {
59
float voltage; /* AD result of measured voltage */
610
float current; /* AD result of measured current */

libraries/tests/rtos/cmsis/mutex/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "cmsis_os.h"
33

4+
#if defined(MBED_RTOS_SINGLE_THREAD)
5+
#error [NOT_SUPPORTED] test not supported
6+
#endif
7+
48
osMutexId stdio_mutex;
59
osMutexDef(stdio_mutex);
610

libraries/tests/rtos/cmsis/queue/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "cmsis_os.h"
33

4+
#if defined(MBED_RTOS_SINGLE_THREAD)
5+
#error [NOT_SUPPORTED] test not supported
6+
#endif
7+
48
typedef struct {
59
float voltage; /* AD result of measured voltage */
610
float current; /* AD result of measured current */

libraries/tests/rtos/cmsis/semaphore/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "cmsis_os.h"
33

4+
#if defined(MBED_RTOS_SINGLE_THREAD)
5+
#error [NOT_SUPPORTED] test not supported
6+
#endif
7+
48
osSemaphoreId two_slots;
59
osSemaphoreDef(two_slots);
610

libraries/tests/rtos/cmsis/signals/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "cmsis_os.h"
33

4+
#if defined(MBED_RTOS_SINGLE_THREAD)
5+
#error [NOT_SUPPORTED] test not supported
6+
#endif
7+
48
DigitalOut led(LED1);
59

610
void led_thread(void const *argument) {

libraries/tests/rtos/cmsis/timer/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "cmsis_os.h"
33

4+
#if defined(MBED_RTOS_SINGLE_THREAD)
5+
#error [NOT_SUPPORTED] test not supported
6+
#endif
7+
48
DigitalOut LEDs[4] = {
59
DigitalOut(LED1), DigitalOut(LED2), DigitalOut(LED3), DigitalOut(LED4)
610
};

libraries/tests/rtos/mbed/basic/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "test_env.h"
33
#include "rtos.h"
44

5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
59
/*
610
* The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and
711
* the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes

libraries/tests/rtos/mbed/file/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
#include "test_env.h"
44
#include "rtos.h"
55

6+
#if defined(MBED_RTOS_SINGLE_THREAD)
7+
#error [NOT_SUPPORTED] test not supported
8+
#endif
9+
610
DigitalOut led2(LED2);
711

812
#define SIZE 100

libraries/tests/rtos/mbed/isr/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "test_env.h"
33
#include "rtos.h"
44

5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
59
#define QUEUE_SIZE 5
610
#define THREAD_DELAY 250
711
#define QUEUE_PUT_ISR_VALUE 128

libraries/tests/rtos/mbed/mail/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "test_env.h"
33
#include "rtos.h"
44

5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
59
typedef struct {
610
float voltage; /* AD result of measured voltage */
711
float current; /* AD result of measured current */

libraries/tests/rtos/mbed/mutex/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "test_env.h"
33
#include "rtos.h"
44

5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
59
#define THREAD_DELAY 50
610
#define SIGNALS_TO_EMIT 100
711

libraries/tests/rtos/mbed/queue/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "test_env.h"
33
#include "rtos.h"
44

5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
59
typedef struct {
610
float voltage; /* AD result of measured voltage */
711
float current; /* AD result of measured current */

libraries/tests/rtos/mbed/semaphore/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "test_env.h"
33
#include "rtos.h"
44

5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
59
#define THREAD_DELAY 75
610
#define SEMAPHORE_SLOTS 2
711
#define SEM_CHANGES 100

libraries/tests/rtos/mbed/signals/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "test_env.h"
33
#include "rtos.h"
44

5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
59
#define SIGNALS_TO_EMIT 100
610
#define SIGNAL_HANDLE_DELEY 25
711
#define SIGNAL_SET_VALUE 0x01

libraries/tests/rtos/mbed/timer/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#include "test_env.h"
33
#include "rtos.h"
44

5+
#if defined(MBED_RTOS_SINGLE_THREAD)
6+
#error [NOT_SUPPORTED] test not supported
7+
#endif
8+
59
DigitalOut LEDs[4] = {
610
DigitalOut(LED1), DigitalOut(LED2), DigitalOut(LED3), DigitalOut(LED4)
711
};

0 commit comments

Comments
 (0)