Skip to content

Wrong volatileness of thread pointers in sched.h #252

@Kijewski

Description

@Kijewski

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.

Metadata

Metadata

Assignees

Labels

Type: questionThe issue poses a question regarding usage of RIOT

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions