From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26584 invoked by alias); 19 Mar 2018 16:57:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 26570 invoked by uid 89); 19 Mar 2018 16:57:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=HCC:D*net, therein X-HELO: relay1.mentorg.com Date: Mon, 19 Mar 2018 16:57:00 -0000 From: Joseph Myers To: Samuel Thibault CC: , Agustina Arzille Subject: Re: [hurd,commited] hurd: Reimplement libc locks using mach's gsync In-Reply-To: <20180318172408.19540-1-samuel.thibault@ens-lyon.org> Message-ID: References: <20180318172408.19540-1-samuel.thibault@ens-lyon.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2018-03/txt/msg00464.txt.bz2 On Sun, 18 Mar 2018, Samuel Thibault wrote: > diff --git a/hurd/hurdlock.c b/hurd/hurdlock.c > +int __lll_abstimed_wait (void *ptr, int val, > + const struct timespec *tsp, int flags, int clk) Lots of functions in this file have the same problem of the function return type being on the same line as the function name (the function name should always start a new line). Other formatting issues in this file: you have operators at end of line in multi-line expressions rather than at start of line; continuation lines in expressions should line up immediately after the corresponding open parenthesis on a previous line, but this file has them less indented than that; don't use redundant parentheses around values passed to "return", it's not a function (so no "return (0)" or "return (ETIMEDOUT)" - but if it's a more complicated expression extending over more than one line, parentheses are appropriate to get the right indentation for the continuation lines). > + unsigned int val = atomic_load_relaxed((unsigned int *)ptr); Missing space before '('. > diff --git a/mach/lowlevellock.h b/mach/lowlevellock.h > +/* Gsync flags. */ > +#ifndef GSYNC_SHARED > + #define GSYNC_SHARED 0x01 > + #define GSYNC_QUAD 0x02 > + #define GSYNC_TIMED 0x04 > + #define GSYNC_BROADCAST 0x08 > + #define GSYNC_MUTATE 0x10 > +#endif That's not how we do preprocessor indentation - we do "# define" with the "#" at start of line instead. But actually nothing else defines GSYNC_SHARED and we discourage such uses of #ifndef as a coding practice anyway (better to have exactly one place that defines something, without using #ifndef, to be typo-proof). So just remove the #ifndef and the indentation of the #defines here. > diff --git a/manual/errno.texi b/manual/errno.texi > index 73272fd884..8917cccb1e 100644 > --- a/manual/errno.texi > +++ b/manual/errno.texi > @@ -882,6 +882,16 @@ the normal result is for the operations affected to complete with this > error; @pxref{Cancel AIO Operations}. > @end deftypevr > > +@deftypevr Macro int EOWNERDEAD > +@standards{GNU, errno.h} > +@errno{EOWNERDEAD, 120, Owner died} > +@end deftypevr > + > +@deftypevr Macro int ENOTRECOVERABLE > +@standards{GNU, errno.h} > +@errno{ENOTRECOVERABLE, 121, State not recoverable} > +@end deftypevr In general I'd expect changes to errno.texi to be accompanied by regeneration of sysdeps/gnu/errlist.c. Does such a regeneration result in no changes to the file, not even to the position in which these errno codes appear therein? -- Joseph S. Myers joseph@codesourcery.com