From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4599 Path: news.gmane.org!not-for-mail From: Jens Eichendorff Newsgroups: gmane.linux.lib.musl.general Subject: What does this code do? Date: Sat, 22 Feb 2014 15:35:43 +0100 Message-ID: <20140222143536.GA5438@diogenes.samsung.router> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1393079751 3231 80.91.229.3 (22 Feb 2014 14:35:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Feb 2014 14:35:51 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4603-gllmg-musl=m.gmane.org@lists.openwall.com Sat Feb 22 15:36:00 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WHDgM-00015O-Kf for gllmg-musl@plane.gmane.org; Sat, 22 Feb 2014 15:35:58 +0100 Original-Received: (qmail 13318 invoked by uid 550); 22 Feb 2014 14:35:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 12286 invoked from network); 22 Feb 2014 14:35:56 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V02:K0:74hUVGGpA+PJyIaVBv+ttzierDcZzrFjoWz1DqyFDLk 6m1P3Sp5Z5WnKrVqWoYXXyZR6kje684Zi/b1ceAD/1sSnTmpzh VHyVxwboO9SbZ5KsSHlLYA3p8tLu6fYMiqVhwhBll3L5pLoqNl KfdikmIv4ICe01qd221DVnSNVl5AMe/bs/5c5yOMldnDGNUTDx beFZp95uoGrAA0TC8Ulw8Rn7pxfTT8vth4PFFACl4zhvMDjNbr /9q4DIdcJBEzCu2G4wUw5LZnCgk3hkFlFrH9CF4ov2PM7sArZf kZNk9fBrO0wNAnNmO/GDcI2zezGyL4H4IgREDjNfgT15DhsazD 3Jrcnk+/1ixx+hq6g29yuAxW0OW2vpRTqBguXlp5C Xref: news.gmane.org gmane.linux.lib.musl.general:4599 Archived-At: While skimming some parts of the musl libc I have come across the following weird line in `src/thread/__wait.c': if (priv) priv = 128; priv=0; whereby `priv' is then bitwise OR-ed to the FUTEX_WAIT operation constant to a futex syscall. Does this code exist to avoid optimizations, do optimizations, or just add waiting time? What does it do and what is the `priv' parameter of __wait() for? Excuse me if this is a really stupid question, I'm not very familiar with somewhat low-level code. Looking through the git logs this is part of the initial import commit, so I could not find any comments to why this was done. MfG Jens