Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
HermitCore
libhermit-rs
Commits
b59ca415
Verified
Commit
b59ca415
authored
Oct 06, 2020
by
Stefan Lankes
Browse files
add function to determine the current task priority
parent
0d743f1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/syscalls/tasks.rs
View file @
b59ca415
...
@@ -298,6 +298,7 @@ fn __sys_block_current_task() {
...
@@ -298,6 +298,7 @@ fn __sys_block_current_task() {
core_scheduler
.block_current_task
(
None
);
core_scheduler
.block_current_task
(
None
);
}
}
/// Set the current task state to `blocked`
#[no_mangle]
#[no_mangle]
pub
extern
"C"
fn
sys_block_current_task
()
{
pub
extern
"C"
fn
sys_block_current_task
()
{
kernel_function!
(
__sys_block_current_task
())
kernel_function!
(
__sys_block_current_task
())
...
@@ -311,7 +312,18 @@ fn __sys_wakeup_task(id: Tid) {
...
@@ -311,7 +312,18 @@ fn __sys_wakeup_task(id: Tid) {
}
}
}
}
/// Wake up the task with the identifier `id`
#[no_mangle]
#[no_mangle]
pub
extern
"C"
fn
sys_wakeup_task
(
id
:
Tid
)
{
pub
extern
"C"
fn
sys_wakeup_task
(
id
:
Tid
)
{
kernel_function!
(
__sys_wakeup_task
(
id
))
kernel_function!
(
__sys_wakeup_task
(
id
))
}
}
fn
__sys_get_priority
()
->
u8
{
core_scheduler
()
.get_current_task_prio
()
.into
()
}
/// Determine the priority of the current thread
#[no_mangle]
pub
extern
"C"
fn
sys_get_priority
()
->
u8
{
kernel_function!
(
__sys_get_priority
())
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment