py/modthread: Implement lock object, for creating a mutex.

This commit is contained in:
Damien George
2016-04-25 11:21:48 +00:00
parent 2dacd604c5
commit 801d1b3803
3 changed files with 104 additions and 0 deletions

View File

@@ -39,6 +39,9 @@
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_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);
#endif // MICROPY_PY_THREAD