mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
py/mpthread.h: Use strong type for mp_thread_set_state() argument.
This modifies the signature of mp_thread_set_state() to use mp_state_thread_t* instead of void*. This matches the return type of mp_thread_get_state(), which returns the same value. `struct _mp_state_thread_t;` had to be moved before `#include <mpthreadport.h>` since the stm32 port uses it in its mpthreadport.h file.
This commit is contained in:
committed by
Damien George
parent
a542c6d7e0
commit
b72cb0ca1b
@@ -30,16 +30,16 @@
|
||||
|
||||
#if MICROPY_PY_THREAD
|
||||
|
||||
struct _mp_state_thread_t;
|
||||
|
||||
#ifdef MICROPY_MPTHREADPORT_H
|
||||
#include MICROPY_MPTHREADPORT_H
|
||||
#else
|
||||
#include <mpthreadport.h>
|
||||
#endif
|
||||
|
||||
struct _mp_state_thread_t;
|
||||
|
||||
struct _mp_state_thread_t *mp_thread_get_state(void);
|
||||
void mp_thread_set_state(void *state);
|
||||
void mp_thread_set_state(struct _mp_state_thread_t *state);
|
||||
void mp_thread_create(void *(*entry)(void*), void *arg, size_t *stack_size);
|
||||
void mp_thread_start(void);
|
||||
void mp_thread_finish(void);
|
||||
|
||||
Reference in New Issue
Block a user