Re: current pointer question/suggestion

Benjamin C.R. LaHaise (blah@kvack.org)
Sat, 18 Jul 1998 20:45:05 -0400 (EDT)


[cc trimmed]

On Sat, 18 Jul 1998, Alexander Kjeldaas wrote:

> Let me give a more thorough example to make this more clear. Let's say
> we have the following macros:
>
>
> #define __current_virt_addr 0x01234567
> #define current ((struct *task_struct)%esp & ~8191)
> #define __current ((struct *task_struct)__current_virt_addr)

And this just plain ain't gonna work on SMP (think of clone'd processes
that shared the same memory mapping). As for whether or not the effoer
worth it on UP is questionable.

-ben

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html