py/modthread: Call mp_thread_start/mp_thread_finish around threads.

So the underlying thread implementation can do any necessary bookkeeping.
This commit is contained in:
Damien George
2016-05-04 09:52:19 +00:00
parent 722cff5fd0
commit 9172c0cb25
2 changed files with 8 additions and 0 deletions

View File

@@ -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);