Message ID | 20211210184133.320748-9-broonie@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F961C433EF for <linux-arm-kernel@archiver.kernel.org>; Fri, 10 Dec 2021 18:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aEAH/DzsUYLjXjzVij7HM9hBjA7HonlUFgvJ1qRHVZ4=; b=eRrbybRy5C0L7r Nq/ka92OfyVe5nraVbfehWWRIE1jsJYPwTtKT7WOXDuQNzlpqfRpVCJltwrEXGcSy4O4V00F31Bj0 U2aFSCaKjljO37Z38ILCoBQkeMuDeTNlaKQBGTL5E2LYie37pMZ96s3M2+p6qFXQRTAEHl3KovmFf MDabgXptuq+JJvZbTGuso0EJZ9/AQZrmx0cM+gKcEe5uB0cePcLWc5YUdb4y9fTVC8dagBNCjM4R0 oV0stxe5eKNGzMe/59qWhup5MW6n1KlXs+632aB9Q7R+B34i9Kx5nHLqYgVAmdFSAaAQqGo4D2Qku qUfqYYxQBl45lo7LXNtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvkvh-003GrJ-0S; Fri, 10 Dec 2021 18:47:37 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvksF-003FMU-0U for linux-arm-kernel@lists.infradead.org; Fri, 10 Dec 2021 18:44:04 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 58DE2CE2C8E; Fri, 10 Dec 2021 18:44:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6064C00446; Fri, 10 Dec 2021 18:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639161839; bh=KfpPJVWRO66fQ+lHM4RrxvOpwpsFMCzrx77xLw3EyNE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H1mes+zYzFZiZJhAtn8qDaksiNRi/yNyfHHTKMc+CUjk0H3EOnc7d7/BoRUsvPnH7 3dwFT0ETXmCP10ie2iNfwb3yQkxePmGxmes+agNfgYAoikDwFoEGhUqGthRDUB6Zks y4qz2Fy0idLTWfZCEzIei+cawv6szJEym1h+Z7WkZ0GVRZDuo4eB4gebl7U+6qLhse tMjPI6IDLZFPuvcrWXNPXlmNvghlAnzYovqxfrN8pW5OLqw6h5KP3O+LEdvk8uVr4x QbPL7KvtpUtqcuYA3F12aDq6ae24AQEF57/JpcLA413CxmnN8a0OeRXTbkPwKdDhuN qHY5olvbERp2w== From: Mark Brown <broonie@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Shuah Khan <skhan@linuxfoundation.org>, Shuah Khan <shuah@kernel.org> Cc: Alan Hayward <alan.hayward@arm.com>, Luis Machado <luis.machado@arm.com>, Salil Akerkar <Salil.Akerkar@arm.com>, Basant Kumar Dwivedi <Basant.KumarDwivedi@arm.com>, Szabolcs Nagy <szabolcs.nagy@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown <broonie@kernel.org>, Willy Tarreau <w@1wt.eu> Subject: [PATCH v7 08/37] tools/nolibc: Implement gettid() Date: Fri, 10 Dec 2021 18:41:04 +0000 Message-Id: <20211210184133.320748-9-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211210184133.320748-1-broonie@kernel.org> References: <20211210184133.320748-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1061; h=from:subject; bh=KfpPJVWRO66fQ+lHM4RrxvOpwpsFMCzrx77xLw3EyNE=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhs59Eztk/96WoNH8DozWFJeEEmhlhgkZPyKxVcLYr laul/l+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYbOfRAAKCRAk1otyXVSH0KSKB/ 43sgipVO8/VsZahGfgj6EejvTLju6RPr2nrGBenujqT0cfDNTyOCl+mi41Oz5KM7vNeYuJhbEdjZJ1 8U06ISC0DlNki1dAFixTRgB54AyXrvGojgugqkpMAqnMBHc5YQvNWbgDLADxgY0DVh7BlnWCzd0lAz Wxhf4hsEJLrpuv0+oKs8jvAno68u+r6bx2/+7Cv95jp8skq2z3rq4Q4ixkLHFjJ89J8Ow6J9WHQvlB Twukrf5hyKcDqd5jvfrR3oYpnenlMdk1aT9/xwrCBJdWLGK27kUqV0tDSCNFJUZkfzRNoZNMHL/0VM 78Fzmnd6OH3duZP7FILYfwsoU4043x X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211210_104403_268480_A18E2144 X-CRM114-Status: GOOD ( 10.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
arm64/sme: Initial support for the Scalable Matrix Extension
|
expand
|
diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h index 3430667b0d24..fea8aace0119 100644 --- a/tools/include/nolibc/nolibc.h +++ b/tools/include/nolibc/nolibc.h @@ -1555,6 +1555,12 @@ pid_t sys_getpid(void) return my_syscall0(__NR_getpid); } +static __attribute__((unused)) +pid_t sys_gettid(void) +{ + return my_syscall0(__NR_gettid); +} + static __attribute__((unused)) int sys_gettimeofday(struct timeval *tv, struct timezone *tz) { @@ -2013,6 +2019,18 @@ pid_t getpid(void) return ret; } +static __attribute__((unused)) +pid_t gettid(void) +{ + pid_t ret = sys_gettid(); + + if (ret < 0) { + SET_ERRNO(-ret); + ret = -1; + } + return ret; +} + static __attribute__((unused)) int gettimeofday(struct timeval *tv, struct timezone *tz) {
Allow test programs to determine their thread ID. Signed-off-by: Mark Brown <broonie@kernel.org> Cc: Willy Tarreau <w@1wt.eu> --- tools/include/nolibc/nolibc.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)