diff options
| author | Damien George | 2016-10-18 09:53:43 +1100 |
|---|---|---|
| committer | Damien George | 2016-10-18 09:53:43 +1100 |
| commit | 50ddaafa6acf5fbbe6f98e64fd5744a9a8347aff (patch) | |
| tree | befec1a67de032a774fc8f785145f51859b8bf7a /cc3200/mpthreadport.c | |
| parent | 4d45f286ebab62fd7c7b524bdfcdf58522b911c8 (diff) | |
cc3200: Use mp_raise_XXX helper functions to reduce code size.
Reduces code size by 632 bytes.
Diffstat (limited to 'cc3200/mpthreadport.c')
| -rw-r--r-- | cc3200/mpthreadport.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cc3200/mpthreadport.c b/cc3200/mpthreadport.c index 064aa6ba1..dd0218098 100644 --- a/cc3200/mpthreadport.c +++ b/cc3200/mpthreadport.c @@ -28,6 +28,7 @@ #include "py/mpconfig.h" #include "py/mpstate.h" +#include "py/runtime.h" #include "py/gc.h" #include "py/mpthread.h" #include "mptask.h" @@ -131,7 +132,7 @@ void mp_thread_create(void *(*entry)(void*), void *arg, size_t *stack_size) { TaskHandle_t id = xTaskCreateStatic(freertos_entry, "Thread", *stack_size / sizeof(void*), arg, 2, stack, tcb); if (id == NULL) { mp_thread_mutex_unlock(&thread_mutex); - nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "can't create thread")); + mp_raise_msg(&mp_type_OSError, "can't create thread"); } // add thread to linked list of all threads |
