From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9440 Path: news.gmane.org!not-for-mail From: Tomasz Sterna Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] add sched_getcpu Date: Wed, 02 Mar 2016 21:46:53 +0100 Organization: Xiaoka.com Message-ID: <1456951613.12169.42.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> 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="=-5eqDlHHu+xFc9oQ0dYrI" X-Trace: ger.gmane.org 1456951638 10355 80.91.229.3 (2 Mar 2016 20:47:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Mar 2016 20:47:18 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9453-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 02 21:47:17 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 1abDft-0008DW-3S for gllmg-musl@m.gmane.org; Wed, 02 Mar 2016 21:47:13 +0100 Original-Received: (qmail 14099 invoked by uid 550); 2 Mar 2016 20:47:11 -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 14081 invoked from network); 2 Mar 2016 20:47:10 -0000 In-Reply-To: <20160301223419.GL9349@brightrain.aerifal.cx> X-Mailer: Evolution 3.18.5.1 (3.18.5.1-1.fc23) X-Scan-Signature: xkh98.infr.xiaoka.com 1abDff-0002A9-EQ eb93fa383ca5c816281e9ad094fb5874 Xref: news.gmane.org gmane.linux.lib.musl.general:9440 Archived-At: --=-5eqDlHHu+xFc9oQ0dYrI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable W dniu 01.03.2016, wto o godzinie 17=E2=88=B634 -0500, u=C5=BCytkownik Rich= Felker napisa=C5=82: > syscall(SYS_exit > SYS_exit cannot be used safely unless you have a single-threaded > program, and in that case you can use _exit (SYS_exit_group). How should I properly terminate current task then? > > syscall(SYS_gettid > For glibc it's been controversial whether to expose tids as a public > API, since it pokes through the pthread abstraction and imposes a 1:1 > threads implementation. I am implementing a threading and mutex API that is different to pthread. (Still 1:1 though.) Using pthread to do this proved to be cumbersome, but using native Linux abstractions turned out to be pretty straightforward. > syscall(SYS_tgkill > tgkill also requires tids to be exposed an potentially has other > issues, and doesn't seem to offer anything that pthread_kill doesn't. As above - using pthreads is not the good way to do it in my case. > wrapped, I am all for it. But if not, why some syscalls are > > special? > I hope I've answered this to some extent. More than enough. Thank you for your patience. --=20 /o__=20 (_<^' "Rome wasn't burned in a day. " --=-5eqDlHHu+xFc9oQ0dYrI 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 iQEcBAABCAAGBQJW11E9AAoJEMbh7DlLbipiN68H/ivq8jjIDXkRm2SpYHsqEmSA FP/s+WOnoViTyz1JRI6CgZa6Z8yYC/IPJ3P7wSzv5iD78tUjPENBsTqnaQP5tTCZ Gq3rfOJrf36Kp9d/s/Ij0Iejd/OcD78IXc2OzPcFbsqb/i91ZgoLg+3AgQVy6yr0 zVYfdGTqAXyU8JsJuL9dQX+dLMLHRmgL/ZbpNe/CNAVp1S7ghY/LcYQv66wdBj5K jEYU8NUiW5WLyiUPbuIKbj8EpfCbEA62mhqEv72Yq3TFRpDAtlWRNSyl2MCBSrbc t4YY85tujcpRYpu7XiJLnoenOIdIwLToNpDbU5AUbcJ8DIkFX0BA4Tng59oYo+Q= =IIkz -----END PGP SIGNATURE----- --=-5eqDlHHu+xFc9oQ0dYrI--