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

posix: minor pthread_barrier clean up #1562

Merged
merged 2 commits into from
Aug 15, 2014
Merged

posix: minor pthread_barrier clean up #1562

merged 2 commits into from
Aug 15, 2014

Conversation

Kijewski
Copy link
Contributor

This are the first two commits of #1307.

pthread_barrier_wait() needs to yield if it woke up a thread with a higher priority, and the Makefile of the accompanying test is cluttered.

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

@LudwigOrtmann, @authmillenon, wanna merge something? :)

@miri64
Copy link
Member

miri64 commented Aug 13, 2014

I do not feel this is in my zone of competence ;-)

@LudwigKnuepfer
Copy link
Member

Sorry, I'm overly busy atm. Assign me if you want me to take a look when I'm free again.

@BytesGalore
Copy link
Member

Sorry I didn't realized I was assigned. I will have a look this afternoon.
Btw. is there a way to be informed if one is assigned to a PR automatically?

}
barrier->next = NULL;
barrier->count = count;
}

mutex_unlock(&barrier->mutex);

if (switch_prio != -1) {
sched_switch(switch_prio);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I don't get it, why this thread should yield() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a thread with a higher priority waited on this barrier, then we need to schedule that one. Always if a thread with a higher priority gets un-blocked the current thread needs to yield.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, thx for the explanation.

@BytesGalore
Copy link
Member

ACK.

Kijewski added a commit that referenced this pull request Aug 15, 2014
…ranch-issue-198

posix: minor pthread_barrier clean up
@Kijewski Kijewski merged commit 89a26b7 into RIOT-OS:master Aug 15, 2014
@Kijewski Kijewski deleted the the-first-two-commits-of-the-branch-issue-198 branch August 15, 2014 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: POSIX Area: POSIX API wrapper Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants