Skip to content

Commit bd00108

Browse files
Nicolas Pitrenashif
authored andcommitted
tests: cmsis_rtos_v1: remove cast abuses
Casting the tid variable from a void* into an u32_t just to cast it back to a pointer is pointless. Let's make it a osThreadId variable upfront and get rid of those casts around it. This also makes it 64-bit compatible. Signed-off-by: Nicolas Pitre <[email protected]>
1 parent 546cf75 commit bd00108

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/cmsis_rtos_v1/src/signal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ void test_signal_events_signalled(void)
163163
/* IRQ offload function handler to set signal flag */
164164
static void offload_function(void *param)
165165
{
166-
u32_t tid = (u32_t)param;
166+
osThreadId tid = param;
167167
int signals;
168168

169169
/* Make sure we're in IRQ context */
170170
zassert_true(k_is_in_isr(), "Not in IRQ context!");
171171

172-
signals = osSignalSet((osThreadId)tid, ISR_SIGNAL);
172+
signals = osSignalSet(tid, ISR_SIGNAL);
173173
zassert_not_equal(signals, 0x80000000, "signal set failed in ISR");
174174
}
175175

0 commit comments

Comments
 (0)