From patchwork Mon Mar 3 06:58:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 25585 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2861E20540 for ; Mon, 3 Mar 2014 06:58:32 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id gq1sf26452879obb.11 for ; Sun, 02 Mar 2014 22:58:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=Y20zYwGmRgNs56Ki+ZIYT2c872fFer2YXBkFpJcj+nE=; b=Yk6P5ZZLQGZooNaxCXYI8w5td7s+JpgEs4ydVtRHkfUY2XX25qrugiR0xXt9B6Mr6O KPgUx/Pfm5+kXBMD19LPEaaSFfsYKoYN0DWUgw2VdPZkp0WepYqVCp/79KvwEsp/7PWP Fwzax9d/9u72EqADultwRt8nZhzC50Zp0rGRi9FlopAMT8hGpkmjZx88HKC8JtqDIM7s ULuP/Krf86S4mGoOOhtlfOB8TEn6uJH6BMIw8APk7iF/XL0PhFWynaP4phwc+KyrMzFN Gk5GhthHAj6dHQ6mFuoznmPm8mFMzNZZ2b4Ymzrm/yVTsAShpONA6n9IKdqFGpod4KNj 8/Pg== X-Gm-Message-State: ALoCoQm1KhYehgAUAAVyWuIipydq4NcyezOWqkZltgwJcKefMBPOOLwAKR3oiAFaAWBtir0UxT2G X-Received: by 10.182.87.2 with SMTP id t2mr13429930obz.2.1393829911698; Sun, 02 Mar 2014 22:58:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.38 with SMTP id n35ls1986318qga.68.gmail; Sun, 02 Mar 2014 22:58:31 -0800 (PST) X-Received: by 10.221.40.10 with SMTP id to10mr15767694vcb.22.1393829911607; Sun, 02 Mar 2014 22:58:31 -0800 (PST) Received: from mail-vc0-x22f.google.com (mail-vc0-x22f.google.com [2607:f8b0:400c:c03::22f]) by mx.google.com with ESMTPS id h11si4470727vcu.44.2014.03.02.22.58.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Mar 2014 22:58:31 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::22f; Received: by mail-vc0-f175.google.com with SMTP id ij19so3208313vcb.34 for ; Sun, 02 Mar 2014 22:58:31 -0800 (PST) X-Received: by 10.58.37.67 with SMTP id w3mr15741595vej.22.1393829911487; Sun, 02 Mar 2014 22:58:31 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp33906vcs; Sun, 2 Mar 2014 22:58:31 -0800 (PST) X-Received: by 10.66.16.131 with SMTP id g3mr1826833pad.138.1393829910932; Sun, 02 Mar 2014 22:58:30 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id wh10si9509963pab.307.2014.03.02.22.58.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Mar 2014 22:58:30 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-47765-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 24231 invoked by alias); 3 Mar 2014 06:58:13 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 24137 invoked by uid 89); 3 Mar 2014 06:58:12 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f44.google.com X-Received: by 10.68.232.134 with SMTP id to6mr1984191pbc.107.1393829889168; Sun, 02 Mar 2014 22:58:09 -0800 (PST) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH 2/2] manual/setjmp.texi: Improve clarity of Sys V context doc Date: Mon, 3 Mar 2014 14:58:01 +0800 Message-Id: <1393829881-22691-2-git-send-email-will.newton@linaro.org> In-Reply-To: <1393829881-22691-1-git-send-email-will.newton@linaro.org> References: <1393829881-22691-1-git-send-email-will.newton@linaro.org> X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 ChangeLog: 2014-03-03 Will Newton * manual/setjmp.texi (System V contexts): Improve clarity and grammar of documentation. --- manual/setjmp.texi | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/manual/setjmp.texi b/manual/setjmp.texi index 3bef1b1..9446abc 100644 --- a/manual/setjmp.texi +++ b/manual/setjmp.texi @@ -307,17 +307,16 @@ The function returns @code{0} if successful. Otherwise it returns @end deftypefun The @code{getcontext} function is similar to @code{setjmp} but it does -not provide an indication of whether the function returns for the first -time or whether the initialized context was used and the execution is -resumed at just that point. If this is necessary the user has to -determine this herself. This must be done carefully since the context -contains registers which might contain register variables. This is a -good situation to define variables with @code{volatile}. +not provide an indication of whether @code{getcontext} is returning for +the first time or whether an initialized context has just been restored. +If this is necessary the user has to determine this herself. This must +be done carefully since the context contains registers which might contain +register variables. This is a good situation to define variables with +@code{volatile}. Once the context variable is initialized it can be used as is or it can -be modified. The latter is normally done to implement co-routines or -similar constructs. The @code{makecontext} function has to be -used to do that. +be modified using the @code{makecontext} function. The latter is normally +done when implementing co-routines or similar constructs. @comment ucontext.h @comment SVID @@ -325,7 +324,7 @@ used to do that. @safety{@prelim{}@mtsafe{@mtsrace{:ucp}}@assafe{}@acsafe{}} @c Linux-only implementations mostly in assembly, nothing unsafe. -The @var{ucp} parameter passed to the @code{makecontext} shall be +The @var{ucp} parameter passed to @code{makecontext} shall be initialized by a call to @code{getcontext}. The context will be modified in a way such that if the context is resumed it will start by calling the function @code{func} which gets @var{argc} integer arguments @@ -436,7 +435,7 @@ function fails it returns @code{-1} and sets @var{errno} accordingly. The easiest way to use the context handling functions is as a replacement for @code{setjmp} and @code{longjmp}. The context contains -on most platforms more information which might lead to less surprises +on most platforms more information which may lead to fewer surprises but this also means using these functions is more expensive (besides being less portable).