Skip to content

Use more standard pthread functions#7

Merged
Meziu merged 4 commits intoMeziu:masterfrom
AzureMarker:tweak/more-standard-thread-functions
Feb 14, 2022
Merged

Use more standard pthread functions#7
Meziu merged 4 commits intoMeziu:masterfrom
AzureMarker:tweak/more-standard-thread-functions

Conversation

@AzureMarker
Copy link
Copy Markdown

@AzureMarker AzureMarker commented Feb 13, 2022

Adds some more pthread functions for Meziu/rust-horizon#10

Also adds a get version, to keep consistency.
I chose the scheduler priorities based on
https://man7.org/linux/man-pages/man7/sched.7.html

I think the cooperative app cores are most like SCHED_FIFO, while the
sys core is similar to SCHED_RR.

However, I don't think our pthread implementation would be able to
accurately return the right policy since we need to know what processor
the thread is running on, and the only API to get that gets the ID for
the current thread. Since the pthread function passes in a thread ID, we
are unable to always get the processor ID and thus the policy.

In this case, I think we should just always return (and accept in set)
SCHED_FIFO. I don't think this will be used anyways.
@AzureMarker AzureMarker force-pushed the tweak/more-standard-thread-functions branch from b4f8459 to acdce9e Compare February 14, 2022 02:53
@Meziu Meziu merged commit 7acbb1f into Meziu:master Feb 14, 2022
@AzureMarker AzureMarker deleted the tweak/more-standard-thread-functions branch February 15, 2022 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants