From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9465 Path: news.gmane.org!not-for-mail From: Tomasz Sterna Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] add sched_getcpu Date: Fri, 04 Mar 2016 23:21:49 +0100 Organization: Xiaoka.com Message-ID: <1457130109.10711.8.camel@xiaoka.com> References: <1456764572-18648-1-git-send-email-nathan@nathan7.eu> <1456780194.12169.25.camel@xiaoka.com> <20160229213057.GE9349@brightrain.aerifal.cx> <1456864521.12169.35.camel@xiaoka.com> <20160301223419.GL9349@brightrain.aerifal.cx> <1456951613.12169.42.camel@xiaoka.com> <20160302211924.GI29662@port70.net> <20160302232635.GP9349@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-JjwbQMngWVI+8fm9k7bk" X-Trace: ger.gmane.org 1457130135 16219 80.91.229.3 (4 Mar 2016 22:22:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Mar 2016 22:22:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9478-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 04 23:22:10 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aby6s-0003LR-CG for gllmg-musl@m.gmane.org; Fri, 04 Mar 2016 23:22:10 +0100 Original-Received: (qmail 13582 invoked by uid 550); 4 Mar 2016 22:22:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13554 invoked from network); 4 Mar 2016 22:22:07 -0000 In-Reply-To: <20160302232635.GP9349@brightrain.aerifal.cx> X-Mailer: Evolution 3.18.5.1 (3.18.5.1-1.fc23) X-Scan-Signature: xkh98.infr.xiaoka.com 1aby6d-0007CJ-VC c524b286e83164f3af35ea2117481c99 Xref: news.gmane.org gmane.linux.lib.musl.general:9465 Archived-At: --=-JjwbQMngWVI+8fm9k7bk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable W dniu 02.03.2016, =C5=9Bro o godzinie 18=E2=88=B626 -0500, u=C5=BCytkownik= Rich Felker napisa=C5=82: > The only safe way to make your own threads is to refrain from using > libc at all and do your own syscalls. Even calling syscall() may not > be safe (on i386/glibc it probably uses the vdso syscall pointer from > TLS); you really need to use asm to make the syscall. I understand. Thank you for explaining. > Is there a reason "pthreads is not a good way to do it"? The thread API I am implementing differs much to pthreads, which required a lot of glue code translating one API to another and felt hand wrenching. On the other hand implementing it on bare syscalls was refreshingly simple. But if I do not want to implement the whole libc with it, I will need to revisit this idea. C'est la vie... --=20 /o__=20 (_<^' The man on tops walks a lonely street; the "chain" of command is ofte= n a noose. --=-JjwbQMngWVI+8fm9k7bk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJW2gp9AAoJEMbh7DlLbipiCmQH/3592frDvH9FrrB0y0NfkNgS R+ct1RZfGNChvuW6iBVcLUkBS0SvKwZTy5h/UbFt+0A1hNhfPdBufBk710XrwmkN Dz7PfGe4F/AIvV/2NZRB74OYpOrjeUd4Ot6EQmnGTXhBMeOzvEnJs0Q1nQORixsO mOFtj84Ujzx1vlSbaOiCN2gFDan2rA8MYe2LXmAL843w6tXdtqXcv17vS+wcWK1X Xfg4dZCewxtUYkYCmWQW7DBtlxMuPHg61WZ284S0VHiKZPbJ4kh/MKI8B5EMTkbC A3UAXmX5DfakbWlhfNiTqN5mMpdZFlCayaib1s96KzlqnnQIswaAXCUquVNA2RQ= =9Tik -----END PGP SIGNATURE----- --=-JjwbQMngWVI+8fm9k7bk--