mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: syscall_cp
Date: Fri, 29 Jan 2016 18:16:04 -0500	[thread overview]
Message-ID: <20160129231603.GB9349@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAD+Cw=fg6B3ayi=4TCTm-b_sk2J7AZWoKcffC0hS1ps7biTOJw@mail.gmail.com>

On Fri, Jan 29, 2016 at 06:03:54PM -0500, Max Ruttenberg wrote:
> and syscall_ret ??

It's a shortcut to avoid duplicating the errno update code in every
syscall wrapper. Instead they all just tail call to __syscall_ret
which returns -1 and sets errno if the return value was an error code,
and otherwise just passes through the return value.

BTW could you please reply inline-with/below quoted text on the list
rather than top-posting? Top-posting makes it hard to follow the flow
of conversation.

Rich


> On Fri, Jan 29, 2016 at 5:50 PM, Josiah Worcester <josiahw@gmail.com> wrote:
> 
> > syscall_cp does largely the same thing as syscall. However, it also checks
> > for a current cancellation request, and exports some symbols (before and
> > after the syscall call) which are used in the thread cancellation
> > implementation. It makes it so the cancellation handler can know whether or
> > not the cancellation request happened during or after a syscall. (if
> > during, it needs to cancel the thread, if after, then it needs to continue
> > executing until the next cancellation point.)
> >
> > On Fri, Jan 29, 2016 at 2:41 PM Max Ruttenberg <
> > mruttenberg@emutechnology.com> wrote:
> >
> >> What is syscall_cp and what is it supposed to do that syscall isn't?
> >>
> >>
> >> --
> >> Max Ruttenberg,
> >> Member of the Technical Staff
> >> Emu *Technology*
> >> 1400 E Angela Blvd, Unit 101
> >> South Bend, IN 46617
> >>
> >
> 
> 
> -- 
> Max Ruttenberg,
> Member of the Technical Staff
> Emu *Technology*
> 1400 E Angela Blvd, Unit 101
> South Bend, IN 46617


      reply	other threads:[~2016-01-29 23:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 22:40 syscall_cp Max Ruttenberg
2016-01-29 22:45 ` syscall_cp Nathan McSween
2016-01-29 22:50 ` syscall_cp Josiah Worcester
2016-01-29 23:03   ` syscall_cp Max Ruttenberg
2016-01-29 23:16     ` Rich Felker [this message]

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=20160129231603.GB9349@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --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).