From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34620 invoked by alias); 15 Sep 2017 07:53:47 -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 34324 invoked by uid 89); 15 Sep 2017 07:53:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=Training, training X-HELO: mail-wr0-f195.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5U/Cc8hSUBSvT6R9fV/iChbmaWr3M4+iZ8bylRAZTzI=; b=jkAsyMOOkye+O7NQmcKHcZdsZV6sIQOtIrkM19+yrIm54kY+1C17cqyb80vF6g5wn/ mtE3I/2TRlp8/mM3GR9HPc+d8L1T7F07RE4sWs7AJn1ufCC71Y2VrlGe+ErBgRJIrY7v RyChjDrXWrtFm89lCzXHaJDqyFjDfxbRG5l/XEH57zGMcQPME9sJLO+I4f13ChVjTVi/ CvwW2QGr9kkNnfd67sCyQ9TDFcnASkq0LF122t//OCelXCDyviMLKOx4idBZaKbOEqhj kbE4p7v2JLNPL/sNySISq36DM1SUabWhUomftSmLVNM+Q6xbYwIYXyY+LB/PcTKgXeBP 8tmw== X-Gm-Message-State: AHPjjUgwjI2Ux+xDfpN/5v5k0404anK/9VvlAzzNA8GHHe17+8w7Y7nW pCySSPpi2mG5mfRvPeg= X-Google-Smtp-Source: ADKCNb4LDflMHGzXmjDPty/9MXZmoG5P5OhQOaQobNH5Qhex+zaAMOmeW4oZGfroX68nKPsIkObnFg== X-Received: by 10.223.183.17 with SMTP id l17mr19419768wre.139.1505462022483; Fri, 15 Sep 2017 00:53:42 -0700 (PDT) Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: Re: [PATCTH 0/2] pthread_mutexattr_setrobust() and pthread_mutex_consistent() To: Yubin Ruan References: <36ab9ec0-b496-c007-c12f-065fd618e7fd@gmail.com> <20170826210528.GA32472@HP.internal.baidu.com> <1159fa2e-006e-d3dd-7d1b-0e055cad42b5@gmail.com> <20170915094414.GA18043@HP.internal.baidu.com> From: "Michael Kerrisk (man-pages)" Message-ID: <31afda7b-cc49-7c8f-c6d4-79b4d4daab1c@gmail.com> Date: Fri, 15 Sep 2017 07:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170915094414.GA18043@HP.internal.baidu.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-09/txt/msg00636.txt.bz2 On 09/15/2017 11:45 AM, Yubin Ruan wrote: > On Wed, Sep 13, 2017 at 05:00:11PM +0200, Michael Kerrisk (man-opages) wrote: >> Hi Yubin >> >>> Hi Michael, >>> >>> Sorry that it took so long. >>> >>> Following is the renew patch. I have corrected several formatting issues (i.e., >>> \n , - , but I can't find anything wrong with ' ) and some typos. The only >>> issue I cannot solve is that the new `pthread_mutex_consistent(3)` page is too >>> short that it shows at the very bottom... please help with this. >>> >>> Also, please find attached three verification snippets. >> >> I've done some heavy editing, and added quite a few pieces to these pages, >> and pushed the results to Git. Go take a look and let me know >> of anything you think needs fixing. Thanks for these pages! > > Good job. No objection, except a minor change and some code formatting change. > See the diff below. Thanks, Yubin. Applied. Cheers, Michael > diff --git a/man3/pthread_mutexattr_setrobust.3 b/man3/pthread_mutexattr_setrobust.3 > index e9e8e76..66b4bed 100644 > --- a/man3/pthread_mutexattr_setrobust.3 > +++ b/man3/pthread_mutexattr_setrobust.3 > @@ -86,7 +86,7 @@ on the mutex will block indefinitely. > .TP > .B PTHREAD_MUTEX_ROBUST > If a mutex is initialized with the > -.BR PTHREAD_MUTEX_ROBUST , > +.BR PTHREAD_MUTEX_ROBUST > attribute and its owner dies without unlocking it, > any future attempts to call > .BR pthread_mutex_lock (3) > @@ -255,22 +255,21 @@ main(int argc, char *argv[]) > s = pthread_mutex_lock(&mtx); > if (s == EOWNERDEAD) { > printf("[main thread] pthread_mutex_lock() returned EOWNERDEAD\\n"); > - printf("[main thread] Now make the mutex consistent\\n"); > + printf("[main thread] Now make the mutex consistent\\n"); > s = pthread_mutex_consistent(&mtx); > if (s != 0) > - handle_error_en(s, "pthread_mutex_consistent"); > - printf("[main thread] Mutex is now consistent; unlocking\\n"); > + handle_error_en(s, "pthread_mutex_consistent"); > + printf("[main thread] Mutex is now consistent; unlocking\\n"); > s = pthread_mutex_unlock(&mtx); > if (s != 0) > - handle_error_en(s, "pthread_mutex_unlock"); > - > + handle_error_en(s, "pthread_mutex_unlock"); > exit(EXIT_SUCCESS); > } else if (s == 0) { > - printf("[main thread] pthread_mutex_lock() unexpectedly succeeded\\n"); > - exit(EXIT_FAILURE); > + printf("[main thread] pthread_mutex_lock() unexpectedly succeeded\\n"); > + exit(EXIT_FAILURE); > } else { > - printf("[main thread] pthread_mutex_lock() unexpectedly failed\\n"); > - handle_error_en(s, "pthread_mutex_lock"); > + printf("[main thread] pthread_mutex_lock() unexpectedly failed\\n"); > + handle_error_en(s, "pthread_mutex_lock"); > } > } > > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/