lkml.org 
[lkml]   [2005]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] (18/22) task_thread_info - part 2/4

Thanks a lot, Al!

On Thu, 25 Aug 2005, Al Viro wrote:
> encapsulates the rest of arch-dependent operations with thread_info access.
> Two new helpers - setup_thread_info() and end_of_stack(). For normal
> case the former consists of copying thread_info of parent to new thread_info
> and the latter returns pointer immediately past the end of thread_info.
>
> Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
> ----
> diff -urN RC13-rc7-task_thread_info/include/linux/sched.h RC13-rc7-other-helpers/include/linux/sched.h
> --- RC13-rc7-task_thread_info/include/linux/sched.h 2005-08-25 00:54:17.000000000 -0400
> +++ RC13-rc7-other-helpers/include/linux/sched.h 2005-08-25 00:54:17.000000000 -0400
> @@ -1138,6 +1138,16 @@
>
> #define task_thread_info(task) (task)->thread_info
>
> +static inline void setup_thread_info(struct task_struct *p, struct thread_info *ti)
^^^^^^^^^^^^^^^^^^^^^
const struct task_struct *p?

> +{
> + *ti = *p->thread_info;
> +}
> +
> +static inline unsigned long *end_of_stack(struct task_struct *p)
^^^^^^^^^^^^^^^^^^^^^
const struct task_struct *p?

> +{
> + return (unsigned long *)(p->thread_info + 1);
> +}
> +

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
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-08-25 10:44    [W:0.691 / U:0.356 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site