[OpenAFS-devel] LWP_SP and LWP_FP, from src/lwp/process.c

chas williams chas@cmf.nrl.navy.mil
Sun, 19 Aug 2001 22:16:37 -0400


>I just stumbled across these in my porting attempts (actually I think
>these are the reason for the segfaults I'm getting). Could anyone explain
>to me what these values mean and why I need them?

LWP_SP is the offset into the jmp_buf struct to the stack pointer.  LWP_FP
is the offset into the jmp_buf struct to the frame pointer.

lwp creates 'threads' by manipulating the stack pointer.  on some machines
you also need to set the frame pointer.

what are the right values for these?  check your /usr/include/*/setjmp.h
files and see if there are any comments describing the contents of
the jmp_buf struct.  if that fails, check the glibc implementation of
setjmp().