-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Wrong volatileness of thread pointers in sched.h #252
Copy link
Copy link
Closed
Labels
Type: questionThe issue poses a question regarding usage of RIOTThe issue poses a question regarding usage of RIOT
Description
Currently there are these two lines in sched.h:
extern volatile tcb_t *sched_threads[MAXTHREADS];
extern volatile tcb_t *active_thread;The first declaration means: "declare sched_threads as array MAXTHREADS of pointer to volatile tcb_t". That is not the thing you want, you want: "declare sched_threads as array MAXTHREADS of volatile pointer to tcb_t".
You need:
extern tcb_t *volatile sched_threads[MAXTHREADS];
extern tcb_t *volatile active_thread;to make the pointers volatile.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: questionThe issue poses a question regarding usage of RIOTThe issue poses a question regarding usage of RIOT