sched: task: implement task_config_get and task_config_set

This commit is contained in:
2026-04-30 19:08:02 +01:00
parent 02a44f67b9
commit 607efa961f
4 changed files with 129 additions and 0 deletions
+34
View File
@@ -297,6 +297,40 @@ struct task *task_from_tid(tid_t id)
return t;
}
kern_status_t task_config_get(
struct task *task,
kern_config_key_t key,
void *out,
size_t max)
{
switch (key) {
case TASK_CFG_ID: {
if (max != sizeof(tid_t)) {
return KERN_INVALID_ARGUMENT;
}
tid_t *value = out;
*value = task->t_id;
return KERN_OK;
}
default:
return KERN_INVALID_ARGUMENT;
}
}
kern_status_t task_config_set(
struct task *task,
kern_config_key_t key,
const void *ptr,
size_t len)
{
switch (key) {
default:
return KERN_INVALID_ARGUMENT;
}
}
void task_exit(int status)
{
struct task *self = get_current_task();