From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aKDRLt8Z0WC0SAAAWB0awg (envelope-from ) for ; Mon, 21 Jun 2021 18:59:43 -0400 Received: by simark.ca (Postfix, from userid 112) id B31E11F1F2; Mon, 21 Jun 2021 18:59:43 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2794A1E54D for ; Mon, 21 Jun 2021 18:59:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4CEB0393C865 for ; Mon, 21 Jun 2021 22:59:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CEB0393C865 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1624316382; bh=WAOvUtFth2IJvw/SnHpKt8i+T4a1o8hBnTlLUTyjCWs=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=HcmNFM8rJux5pBjVYFYc3LF1Q8ZNozJI6Huz0JlihMe6DVAeuwU5iHhDk5h197wm9 I8vRWfE2PJqQxM3MD6QPCIFOKoBZI47IC3dvbxZl6zh+L6mFasrsxGiKqkGxW658tS nl0dhbCQ5aGc2wEnOsBIZvkI5ysymD/GOXryHJkE= Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by sourceware.org (Postfix) with ESMTPS id 5E9863857437 for ; Mon, 21 Jun 2021 22:59:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5E9863857437 Received: by mail-qk1-x72f.google.com with SMTP id j184so34767598qkd.6 for ; Mon, 21 Jun 2021 15:59:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WAOvUtFth2IJvw/SnHpKt8i+T4a1o8hBnTlLUTyjCWs=; b=DUcZQVUu+f9zXqNc31L34rPGq2Hp1F57opJw8Aixf6++qEY2YeJIrw/C4YKKKR9axC Bf2WkUxpY96zxngkOA41HZxVLPO208ZSeeJ1sVTXnt4gbljNS38Mv6B5LfYFWNUrTiLP HhC2XLRE1O9yM5j1AqHU4l19sblwiXTc0OOCzIkDCdVVo9cYbJO4U63gYnvqE6fO3vju vtfy7qM6E/R5wnrAZzbsWuyBJnVNNUxHlWFukOGre4otpwnbchhlcV2dZhEsQmbJu75y avzddNCs98k6nHbT5FDi1Bc4s5Z+ak/KynFJwLHnG4j21VSoDXy2n03GHOJdTRz8BRXt VoOw== X-Gm-Message-State: AOAM530qrtlaiSy6gliHJ/kgY6AKP3XSFsI0eqggX9ZHp9sBl5GynR+1 DmgqR8wMj9KtpYl2MaBSXusarv7NsH6vlwjNM/mHg4158Zw= X-Google-Smtp-Source: ABdhPJwartF7td5XJ4HpD5RVv9qOXuoJyc1B3Z6X6qIq7NiPBmZ0k+9QzeUgg/kGnuEe/NtHdOnDXoCbnGOKQHDtSvA= X-Received: by 2002:a37:43c3:: with SMTP id q186mr1060155qka.419.1624316350690; Mon, 21 Jun 2021 15:59:10 -0700 (PDT) MIME-Version: 1.0 References: <20210621035505.29431-1-vapier@gentoo.org> In-Reply-To: <20210621035505.29431-1-vapier@gentoo.org> Date: Mon, 21 Jun 2021 17:58:33 -0500 Message-ID: Subject: Re: [PATCH 1/3] sim: callback: add a getpid interface To: Mike Frysinger Content-Type: text/plain; charset="UTF-8" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Christian Biesinger via Gdb-patches Reply-To: Christian Biesinger Cc: gdb-patches Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Sun, Jun 20, 2021 at 10:55 PM Mike Frysinger via Gdb-patches wrote: > --- a/sim/common/callback.c > +++ b/sim/common/callback.c > @@ -556,6 +556,17 @@ os_truncate (host_callback *p, const char *file, int64_t len) > #endif > } > > +static int > +os_getpid (host_callback *p) > +{ > + int result; > + > + result = getpid (); sim is C11, right? Why not write this as "int result = getpid ();"? Christian