diff options
author | Damien George <damien.p.george@gmail.com> | 2016-05-04 09:52:19 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-06-28 11:28:49 +0100 |
commit | 9172c0cb252faa47f56e61f67ceb213012631de2 (patch) | |
tree | 71b9a84fb456ec2a85994cb9f1851baf0bee424e /py/mpthread.h | |
parent | 722cff5fd0debb250af827fd556dc0cab94e07d7 (diff) | |
download | micropython-9172c0cb252faa47f56e61f67ceb213012631de2.tar.gz micropython-9172c0cb252faa47f56e61f67ceb213012631de2.zip |
py/modthread: Call mp_thread_start/mp_thread_finish around threads.
So the underlying thread implementation can do any necessary bookkeeping.
Diffstat (limited to 'py/mpthread.h')
-rw-r--r-- | py/mpthread.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/mpthread.h b/py/mpthread.h index a92f2d0797..d0164ea29e 100644 --- a/py/mpthread.h +++ b/py/mpthread.h @@ -41,6 +41,8 @@ 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_create(void *(*entry)(void*), void *arg, size_t stack_size); +void mp_thread_start(void); +void mp_thread_finish(void); void mp_thread_mutex_init(mp_thread_mutex_t *mutex); int mp_thread_mutex_lock(mp_thread_mutex_t *mutex, int wait); void mp_thread_mutex_unlock(mp_thread_mutex_t *mutex); |