Commit 95d40ec2 authored by Jan Kiszka's avatar Jan Kiszka

alchemy: Fully initialize tcb->self

Make sure the thread field of tcb->self is always initialized as
rt_task_self returns it.
Reported-by: default avatarMauro Salvini <>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent fbce1239
...@@ -443,10 +443,12 @@ int rt_task_create(RT_TASK *task, const char *name, ...@@ -443,10 +443,12 @@ int rt_task_create(RT_TASK *task, const char *name,
cta.stacksize = stksize; cta.stacksize = stksize;
ret = __bt(copperplate_create_thread(&cta, &tcb->thobj.ptid)); ret = __bt(copperplate_create_thread(&cta, &tcb->thobj.ptid));
if (ret) if (ret) {
delete_tcb(tcb); delete_tcb(tcb);
else } else {
tcb->self.thread = tcb->thobj.ptid;
task->thread = tcb->thobj.ptid; task->thread = tcb->thobj.ptid;
out: out:
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