From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130354 invoked by alias); 15 Sep 2017 02:49:17 -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 130344 invoked by uid 89); 15 Sep 2017 02:49:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12,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= X-HELO: mail-pg0-f54.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=czmTHxAPZ7gGKxKPZAGMy/Yl1acm5thpGUJT3f79+Yc=; b=nLSIKuqvldAMvsYiVlzHYIM4WQCmBB5cz+hU56+9TTKRAQVbMnNsRQpO0BJXKKGtWE FiSL28kRirzQhTfQ0NSEvU6muXGLjgK3eUo2rBLOp4kDWt2WWbv/1hhVdpWsyhTq0qjz u0siaynK5QucTisLSrlZpe2VtNMyCeWFb/E4QJkgxAVDfoCyiIKcF1AiIlVlc0ogl5sL TjJ71Doz1x72TSFlubbc3vFOwJSCLN/2U/vv6LwJTAskcS9rx6GUQNRAPjJkZOaiqSnP KbKhiWpEfGlOXjpvoK94HUTFsyFTQY4L+/hrBUh/it8+LqNsQVrwcHToBbKZ1jZp381s 4UMA== X-Gm-Message-State: AHPjjUjUJ623AEFIzHRQAD2w7uIuE+HyKAMlzR1zRI51cq40O3kMn/8b Fp/Xr8LDnMZ5WA== X-Google-Smtp-Source: ADKCNb7QSQQgJvHUHwMHdl1Lx/rr/QXDTKppScNhXoloulhuQVqYeioWrX8LHmKS3cSWPIY/IMBHww== X-Received: by 10.101.83.4 with SMTP id m4mr15363992pgq.266.1505443753771; Thu, 14 Sep 2017 19:49:13 -0700 (PDT) Date: Fri, 15 Sep 2017 02:49:00 -0000 From: Yubin Ruan To: "Michael Kerrisk (man-opages)" Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org Subject: Re: [PATCTH 0/2] pthread_mutexattr_setrobust() and pthread_mutex_consistent() Message-ID: <20170915094414.GA18043@HP.internal.baidu.com> References: <36ab9ec0-b496-c007-c12f-065fd618e7fd@gmail.com> <20170826210528.GA32472@HP.internal.baidu.com> <1159fa2e-006e-d3dd-7d1b-0e055cad42b5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1159fa2e-006e-d3dd-7d1b-0e055cad42b5@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2017-09/txt/msg00635.txt.bz2 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. Yubin 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"); } }