Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
815b79a8
Commit
815b79a8
authored
Mar 27, 2019
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
esp32/mpthreadport: Exit vPortCleanUpTCB early if threading not init'd.
parent
0b86ba56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
ports/esp32/mpthreadport.c
ports/esp32/mpthreadport.c
+5
-1
No files found.
ports/esp32/mpthreadport.c
View file @
815b79a8
...
...
@@ -54,7 +54,7 @@ typedef struct _thread_t {
// the mutex controls access to the linked list
STATIC
mp_thread_mutex_t
thread_mutex
;
STATIC
thread_t
thread_entry0
;
STATIC
thread_t
*
thread
;
// root pointer, handled by mp_thread_gc_others
STATIC
thread_t
*
thread
=
NULL
;
// root pointer, handled by mp_thread_gc_others
void
mp_thread_init
(
void
*
stack
,
uint32_t
stack_len
)
{
mp_thread_set_state
(
&
mp_state_ctx
.
thread
);
...
...
@@ -166,6 +166,10 @@ void mp_thread_finish(void) {
}
void
vPortCleanUpTCB
(
void
*
tcb
)
{
if
(
thread
==
NULL
)
{
// threading not yet initialised
return
;
}
thread_t
*
prev
=
NULL
;
mp_thread_mutex_lock
(
&
thread_mutex
,
1
);
for
(
thread_t
*
th
=
thread
;
th
!=
NULL
;
prev
=
th
,
th
=
th
->
next
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment