lkml.org 
[lkml]   [2005]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: more thread_info patches
On Tue, 31 May 2005 01:48:28 +0200 (CEST) Roman Zippel wrote:

| Hi,
|
| On Thu, 21 Apr 2005, Al Viro wrote:
|
| > thread_info, part 1:
|
| Here are some possible followup patches. Since it's already some time ago
| here are the original posts for everyone else:
| http://marc.theaimsgroup.com/?l=linux-kernel&m=111410539627881&w=2
|
| This introduces an additional stack variable in task_struct. It's
| basically redundant with the thread_info pointer, but in the long term I'd
| like to get of the latter (with the following patches).
|
| ---
|
| include/linux/init_task.h | 1 +
| include/linux/sched.h | 1 +
| kernel/fork.c | 1 +
| 3 files changed, 3 insertions(+)
|
| Index: linux-2.6-mm/include/linux/sched.h
| ===================================================================
| --- linux-2.6-mm.orig/include/linux/sched.h 2005-05-31 01:19:01.636591190 +0200
| +++ linux-2.6-mm/include/linux/sched.h 2005-05-31 01:19:05.913856451 +0200
| @@ -617,6 +617,7 @@ struct mempolicy;
| struct task_struct {
| volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
| struct thread_info *thread_info;
| + void *stack;

Any reason this is void * instead of being more strongly typed?
Does the actual type vary?


And a general comments about the 4 emails:
they all have the same subject. :(

I guess you need to read & follow:
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
and
http://linux.yyz.us/patch-format.html

so that Andrew doesn't have to keep saying this over and over again
(no, it's not just you).


| atomic_t usage;
| unsigned long flags; /* per process flags, defined below */
| unsigned long ptrace;
| Index: linux-2.6-mm/include/linux/init_task.h
| ===================================================================
| --- linux-2.6-mm.orig/include/linux/init_task.h 2005-05-31 01:19:01.636591190 +0200
| +++ linux-2.6-mm/include/linux/init_task.h 2005-05-31 01:19:05.913856451 +0200
| @@ -71,6 +71,7 @@ extern struct group_info init_groups;
| { \
| .state = 0, \
| .thread_info = &init_thread_info, \
| + .stack = &init_stack, \
| .usage = ATOMIC_INIT(2), \
| .flags = 0, \
| .lock_depth = -1, \
| Index: linux-2.6-mm/kernel/fork.c
| ===================================================================
| --- linux-2.6-mm.orig/kernel/fork.c 2005-05-31 01:19:01.636591190 +0200
| +++ linux-2.6-mm/kernel/fork.c 2005-05-31 01:19:29.954726757 +0200
| @@ -173,6 +173,7 @@ static struct task_struct *dup_task_stru
| *tsk = *orig;
| setup_thread_info(tsk, ti);
| tsk->thread_info = ti;
| + tsk->stack = ti;
| ti->task = tsk;
|
| /* One for us, one for whoever does the "release_task()" (usually parent) */
| -

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-31 03:31    [W:1.457 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site