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 Saturday 04 January 2003 00:31, Ulrich Drepper wrote:
> 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.

Well, I didn't understand the register saving/restoring, but the C example 
from Jakub made it clear to me.

> > - 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.

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.

> > - 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.

No, it just uses __set_errno (sysdeps/unix/sysv/linux/powerpc/sysdep.c).

Franz.


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