[LITMUS^RT] System calls definition and task creation
Björn Brandenburg
bbb at mpi-sws.org
Thu Jun 5 11:36:45 CEST 2014
On 05 Jun 2014, at 11:06, Chandrasekaran Sivakumar <chandru.a6 at gmail.com> wrote:
> Hi all,
> In order to modify the task model in litmus-rt, I need to know where and how the tasks are being created. When I tried to back trace from rtspin.c, everything leads to syscall function called from liblitmus/src/syscalls.c Could anyone please tell me where is task creation done ?
>
> Thanks & Regards,
> chandru
Hi Chandru,
your tracing pointed out the right spot. Task "creation" is a kernel service, so it is invoked via system calls.
In LITMUS^RT, a task first sets its parameters with set_rt_task_param()
userspace: https://github.com/LITMUS-RT/liblitmus/blob/master/src/syscalls.c#L20
kernel: https://github.com/LITMUS-RT/litmus-rt/blob/master/litmus/litmus.c#L96
and then transitions to real-time mode with task_mode(), which is a wrapper around sched_setscheduler():
userspace: https://github.com/LITMUS-RT/liblitmus/blob/master/src/task.c#L71
kernel: https://github.com/LITMUS-RT/litmus-rt/blob/master/kernel/sched/core.c#L3942
Regards,
Björn
More information about the litmus-dev
mailing list