Commit 5c72e210 authored by Ingo Molnar's avatar Ingo Molnar

[PATCH] threading fix, tid-2.5.47-A3

This introduces the sys_set_thread_address() syscall.  It sets the tid
address (which gets cleared at VM release time) and returns the PID so
that the newly initialized 'initial thread' does not have to do an
additional sys_gettid() call.

It is used to bootstrap a thread group where the original thread user
hasn't had a tid address assigned to it by any parent.
parent 4a539f1c
......@@ -767,6 +767,7 @@ ENTRY(sys_call_table)
.long sys_epoll_ctl /* 255 */
.long sys_epoll_wait
.long sys_remap_file_pages
.long sys_set_tid_address
.rept NR_syscalls-(.-sys_call_table)/4
......
......@@ -679,6 +679,13 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p)
p->flags = new_flags;
}
asmlinkage int sys_set_tid_address(int *user_tid)
{
current->user_tid = user_tid;
return current->pid;
}
/*
* This creates a new process as a copy of the old one,
* but does not actually start it yet.
......
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