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?


Franz Sirl wrote:

> What exactly has PSEUDO in sysdep-cancel.h to do? I couldn't find a 
> specification and judging from the other arches is difficult, cause I don't 
> know their ABI.

Certain interfaces which Linux implements as syscalls are "cancelable".
 I.e., if another thread calls pthread_cancel() they must be
interrupted.  This requires that the cancel signal is allowed to be sent
while the syscall is worked on (normally cancellation just involvs
setting a few flags).  To avoid te overhead of doing this when it's not
necessary the PSEUDO macro first determines whether cancellation is
needed.  If not, the simple syscall is performed.  If it is needed, the
enable and disable functions are called.


> - what has to happen between CENABLE and CDISABLE?

The syscall is performed.


> - does PSEUDO fall thru to anything?

The semantics outside the macro hasn't changed.  PSEUDO is used exactly
as before.  Normally there is only the return opcode following the PSEUDO.


> - is it OK to compile in sysdep.c on PPC (maybe sysdep.c should be compiled 
> into libpthread on all arches to match libc?) to get the __syscall_error 
> routine into libpthread?

If it's necessary do it for PPC.  But make sure nothing which mustn't be
duplicated (like errno) gets duplicated.

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------


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