diff options
| author | Ingo Molnar <mingo@elte.hu> | 2002-11-16 19:22:19 -0800 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2002-11-16 19:22:19 -0800 |
| commit | 5c72e21034b59fd8208dadfe414bdb1688ee8765 (patch) | |
| tree | 3522ddbd7d3e07665295ed0751b62ef33a1e1e55 /kernel | |
| parent | 4a539f1c62c6a5ba63b93323b23bfc6f10937586 (diff) | |
[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.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/fork.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index a9f8eb192f9a..accc05f2fef5 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -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. |
