[PATCH] Avoid cancellation point in pthread_mutex_lock etc. in linuxthreads

Jakub Jelinek jakub@redhat.com
Tue Apr 1 20:17:00 GMT 2003


On Tue, Apr 01, 2003 at 11:50:25AM -0800, Roland McGrath wrote:
> Why __pthread_sigsuspend instead of just using INTERNAL_SYSCALL directly?
> kernel-features.h can define something about rt_sigsuspend vs sigsuspend
> for each machine.

It differs between arches.
On most arches it is
INTERNAL_SYSCALL (rt_sigsuspend, err, 2, set, _NSIG / 8);
on some for compatibility
INTERNAL_SYSCALL (sigsuspend, err, 3, 0, 0, set->__val[0]);
(with possible runtime choice) but on Alpha it is
INTERNAL_SYSCALL (sigsuspend, err, 1, set->__val[0]);
(well, looks like the same on sparc32 for pre-rtsig kernels,
apparently nobody is running < 2.2.x kernels on sparc any more).
I think best would be a special header in
linuxthreads/sysdeps/unix/sysv/linux/*
and inline the call to avoid the call/return overhead.

	Jakub



More information about the Libc-hacker mailing list