Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all over the place: use sched_active_pid #1575

Merged
merged 1 commit into from
Aug 21, 2014
Merged

all over the place: use sched_active_pid #1575

merged 1 commit into from
Aug 21, 2014

Conversation

Kijewski
Copy link
Contributor

In many places we needlessly use sched_active_thread->pid whilst we
already have sched_active_pid with the same value, and one less
indirection.

@Kijewski Kijewski added this to the Release NEXT MAJOR milestone Aug 14, 2014
@kaspar030
Copy link
Contributor

ACK. maybe state that thread_getpid is now static inline.

@Kijewski
Copy link
Contributor Author

I added ``thread_getpid()is madestatic inline` so that there is no penalty in
using this function over accessing `sched_active_pid` directly.` to the description of the PR.

@kaspar030
Copy link
Contributor

+1, no time to do tests atm...

In many places we needlessly use `sched_active_thread->pid` whilst we
already have `sched_active_pid` with the same value, and one less
indirection.

`thread_getpid()` is made `static inline` so that there is no penalty in
using this function over accessing `sched_active_pid` directly.
@LudwigKnuepfer
Copy link
Member

ACK

Kijewski added a commit that referenced this pull request Aug 21, 2014
all over the place: use sched_active_pid
@Kijewski Kijewski merged commit 639dae4 into RIOT-OS:master Aug 21, 2014
@Kijewski Kijewski deleted the use-sched_active_pid branch August 21, 2014 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: core Area: RIOT kernel. Handle PRs marked with this with care! Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants