mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Syscall cleanup?
Date: Sun, 2 Sep 2012 13:02:20 -0400	[thread overview]
Message-ID: <20120902170220.GD27715@brightrain.aerifal.cx> (raw)

Hi all,

I just committed the inline/__inline patch resolving the issue with
syscall.h, but I'd like to reconsider some issues with syscall.h. The
whole inline issue arose from having inline asm for syscalls that gets
exposed in the public syscall.h header. To me this seems both
gratuitously incompatible with non-GNUC compilers, and gratuitously
dependent on the __syscall_ret function in musl which was never really
intended to be exposed as a public interface.

What I'd like to consider doing is:

1. Have the public syscall.h only expose __NR_* and SYS_* macros and
the variadic long syscall(long, ...) function, possibly even
eliminating the remapping of legacy syscalls to their 64-bit variants,
etc.

2. To achieve this, keeping only the syscall number definitions in
bits/syscall.h and moving the __SYSCALL_LL_* macros and inline syscall
functions to an internal arch-specific header, and if we want to
remove the legacy/64-bit remapping from the public header, putting
this remapping in the private arch-level header.

I think this approach is arguably cleaner (but some people might
disagree), and would probably stand up better against applications
doing stupid things (like assuming syscall() is a function rather than
a variadic macro).

Opinions?

Rich


                 reply	other threads:[~2012-09-02 17:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120902170220.GD27715@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).