lkml.org 
[lkml]   [2004]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: pid offset into task structre
From
On Thu, Oct 21, 2004 at 09:34:48PM -0200, Fabiano Ramos wrote:
> Hi All. Some newbie question.
> 1) Considering that I provided the correct value in PID_OFFSET, will
> ebx contain the pid of the task that issued the syscall, at the end of the
> fragment?

yes

> 2) By taking some address arithmetic (&tsk.pid - &tsk) I got 144. Is this
> offset always the same? Is that an easy way to get it directly from
> assembly code?

Generate it from arch/$ARCH/kernel/asm-offset.c with the same mecanism that
TI_task uses.

something like:

OFFSET(TASK_pid, task_struct, pid);

--
Tab
-
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-03-22 14:07    [W:0.047 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site