Commit 0c06ad9d authored by Pavel Emelyanov's avatar Pavel Emelyanov

core: Introduce task_timers_entry

This one will hold all info about timers in the core_entry.
Since timers are always per-task, this one is on task core
entry.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9359084d
...@@ -3,6 +3,7 @@ import "core-arm.proto"; ...@@ -3,6 +3,7 @@ import "core-arm.proto";
import "core-aarch64.proto"; import "core-aarch64.proto";
import "rlimit.proto"; import "rlimit.proto";
import "timer.proto";
message task_core_entry { message task_core_entry {
required uint32 task_state = 1; required uint32 task_state = 1;
...@@ -13,6 +14,8 @@ message task_core_entry { ...@@ -13,6 +14,8 @@ message task_core_entry {
required uint64 blk_sigset = 5; required uint64 blk_sigset = 5;
required string comm = 6; required string comm = 6;
optional task_timers_entry timers = 7;
} }
message task_kobj_ids_entry { message task_kobj_ids_entry {
......
...@@ -18,3 +18,6 @@ message posix_timer_entry { ...@@ -18,3 +18,6 @@ message posix_timer_entry {
required uint64 vsec = 9; required uint64 vsec = 9;
required uint64 vnsec = 10; required uint64 vnsec = 10;
} }
message task_timers_entry {
}
...@@ -39,6 +39,7 @@ CoreEntry *core_entry_alloc(int th, int tsk) ...@@ -39,6 +39,7 @@ CoreEntry *core_entry_alloc(int th, int tsk)
sz += sizeof(TaskRlimitsEntry); sz += sizeof(TaskRlimitsEntry);
sz += RLIM_NLIMITS * sizeof(RlimitEntry *); sz += RLIM_NLIMITS * sizeof(RlimitEntry *);
sz += RLIM_NLIMITS * sizeof(RlimitEntry); sz += RLIM_NLIMITS * sizeof(RlimitEntry);
sz += sizeof(TaskTimersEntry);
} }
} }
if (th) if (th)
...@@ -71,6 +72,9 @@ CoreEntry *core_entry_alloc(int th, int tsk) ...@@ -71,6 +72,9 @@ CoreEntry *core_entry_alloc(int th, int tsk)
rls->rlimits[i] = xptr_pull(&m, RlimitEntry); rls->rlimits[i] = xptr_pull(&m, RlimitEntry);
rlimit_entry__init(rls->rlimits[i]); rlimit_entry__init(rls->rlimits[i]);
} }
core->tc->timers = xptr_pull(&m, TaskTimersEntry);
task_timers_entry__init(core->tc->timers);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment