This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: is sysdep-cancel.h needed for any linux arch?


On Sat, Jan 04, 2003 at 06:38:57AM +0100, Franz Sirl wrote:
> On Saturday 04 January 2003 01:01, Jakub Jelinek wrote:
> > On Sat, Jan 04, 2003 at 12:55:35AM +0100, Franz Sirl wrote:
> > > > The semantics outside the macro hasn't changed.  PSEUDO is used exactly
> > > > as before.  Normally there is only the return opcode following the
> > > > PSEUDO.
> > >
> > > Usually PSEUDO is used in some script-generated assembler stubs and I
> > > couldn't find if anything  special was emitted after it. On PPC "ret"
> > > handles both the error and non-error syscall returns.
> >
> > But of course, if it is not what you want in the cancellable PSEUDO();
> > ret; PSEUDO_END() sequence, you can #undef PSEUDO_RET and define it
> > to something different, even to nothing in sysdep-cancel.h.
> 
> I just wanted to make sure nothing comes in-between PSEUDO(); ret;. If that's 
> assured, all is fine.
> 
> So, my initial version seems to work in the pthread case, but in the libc case 
> it crashes in __libc_enable_asynccancel while calling  
> (*__libc_pthread_functions.ptr_pthread_thread_self)() which is zero. As this 
> happens still during library init, who is responsible for initing the 
> __libc_pthread_functions struct with the proper values?

__libc_enable_asynccancel should be called only if __libc_multiple_threads
is non-zero. __libc_multiple_threads is set to 1 during first pthread_create,
ie. certainly not during library init. If it is non-zero (ie. if
pthread_create has been called), then libpthread must be certainly long time
initialized, which is libpthread.so's crt* calling
__pthread_initialize_minimal -> __libc_pthread_init.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]