Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.20.1602292311050.14767@monopod.intra.ispras.ru>
Date: Mon, 29 Feb 2016 23:17:07 +0300 (MSK)
From: Alexander Monakov <amonakov@...ras.ru>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] add sched_getcpu

> > As far as I can tell, syscall() is supposed to set errno (using
> > __sycall_ret), but maybe src/misc/syscall.c isn't what I think it is?
> >
> I indeed got the return value backwards, and I'll fix that, along with the
> > #ifdef.
> >
> Actually, nope, that ternary is the right way round, and __sycall_ret
> handles the -1 return.

Ah, indeed my original objection was wrong; however please note that you're
not calling syscall from src/misc/syscall.c here; it's #defined in
src/internal/syscall.h to __syscall_ret(__syscall(...)), and the typical usage
in musl internally is either tailcalling to syscall, or calling __syscall
where handling provided by __syscall_ret is not useful.

I'd recommend using __syscall and __syscall_ret here.

Alexander

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.