This is the mail archive of the libc-alpha@sourceware.org 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]

Bug 14138 - Move some functions to syscalls.list


The bug report states:
"The removal of compatibility code for old Linux kernel versions has left some
functions just calling a syscall with INLINE_SYSCALL or INTERNAL_SYSCALL
(possibly with cancellation handling), so that it may be possible to use
syscalls.list entries instead of custom C code.  Such files have the comment

/* Consider moving to syscalls.list.  */

(some now after removal of pre-2.2 support, more later after removal
of pre-2.4 support goes in)."

I've looked at a few examples and would like to know what you all
think is the best course of action. Let's take getrlimit as an
example.

The Linux/i386 implementation is:
 int
__new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
{
  return INLINE_SYSCALL (ugetrlimit, 2, resource, CHECK_1 (rlimits));
}

and the file is included from others like: 

./sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c:#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
./sysdeps/unix/sysv/linux/powerpc/getrlimit.c:#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
./sysdeps/unix/sysv/linux/sh/getrlimit.c:#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
./ports/sysdeps/unix/sysv/linux/arm/getrlimit.c:#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
./ports/sysdeps/unix/sysv/linux/am33/getrlimit.c:#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
./ports/sysdeps/unix/sysv/linux/m68k/getrlimit.c:#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>

There's not a single syscalls.list file to use since newer ports -
like x86-64 and s390-64, use the getrlimit call (defined in
sysdeps/unix/syscalls.list). Older architectures use ugetrlimit which
is the same as getrlimit on newer archs. So, there's no single file
AFAIK where I can add to.

Removing the i386 file would mean to add to each of the i386, s390-32,
powerpc, sh, arm, am33, and m68k syscalls.list files a line for
getrlimit using ugetrlimit. 

Is that the right approach and worthwhile doing? Or should we leave
the status quo instead?

Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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