Message ID | 20240323173301.151066-13-bugaevc@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=k2BXiZNZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V25x75QsSz1yXr for <incoming@patchwork.ozlabs.org>; Sun, 24 Mar 2024 04:37:15 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 44416385841C for <incoming@patchwork.ozlabs.org>; Sat, 23 Mar 2024 17:37:13 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 50695385843A for <libc-alpha@sourceware.org>; Sat, 23 Mar 2024 17:35:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 50695385843A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 50695385843A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::136 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711215328; cv=none; b=VOyfLy2rvzd0g3fhT+MYFXXvnDo1IEwWSrJ3KKm2CVPbQz1Y2Ft19+1AXJEkOYPfVnfkGv8OpzfzgQ9Vy5dE+331Anh7GHEU2bIVwKUIGtaHn32Wai5Yasj+VVUyoS50TmoFkc/7fsCSVSro/UQHEnYah1u4+uwogQZkALaifco= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711215328; c=relaxed/simple; bh=fYNNHETKDZINdV2DOxbb0ZFSLn0UrR+Q4Ngs7C4fC/M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=FPnLBC2g3yQvXYpH6seyw+AX67zXRd6hYlMjpYwrehbFAhVCejwZoiID2D8asTJdnACMYl2wjoZa/IM6LGb6vFfqBOrA1o9/B282+r5yyrv6heOS9hAzCKhW5UTQQ5yvm4RTP2ao2lHEBwHKjczHjWiEVcJ9SC4SI3eHi3ks+cM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-513d23be0b6so3743451e87.0 for <libc-alpha@sourceware.org>; Sat, 23 Mar 2024 10:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711215323; x=1711820123; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=m703ExJuiZxvfZQVvWll8KQfNXW33WwwGGxxZCezCd4=; b=k2BXiZNZ0HTSrDeTT49e2shjA0JT4M9voAHuJKLZsar5Q+5q7rBK5FAvPFF/7TBvVK GE7s07vLmX6caekNObVTkVj+vYfLcGHvR1HrpRyDsKsF7iOq0JjvJIYbMpkFgoLaO3JY m8/Utx1RyFdD8CFiiqdYlQoZGREjVsCA09Tz4Q039HjajHlASEyYF2wPFd80g87bvv7x 8t8LuweMjTl61kxkCbb8KizUODf0rgmWOA7FMFgB0QCpn9vE6noRituSV+FQeu55RTTj m0F0Dh70Amwu4qL1C6IX5YbINOBMCGbIFLErBgF1V9XgsPxUOXtJbjhIrqtDlfeczL4W I4gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215323; x=1711820123; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m703ExJuiZxvfZQVvWll8KQfNXW33WwwGGxxZCezCd4=; b=rG50e0o0tYcAHgoQNxClP+j7SuA/n/zTZBAz66rbmmG3cG3fY++ZuHQbH7Fus6aiZY HoX0gaytSPyDNQF+bmpyznC6/kobGdlTFO3T04CgoxRP4K6y6XFY+hjrfr1HXIgRIPwn kUbD1rbhpQpj0x2RXeoSv69ZgsEgK3oIpt+EfCVogV259yX0rMK+tguDzdIVoO4dLOhw nzHJLJ3UqfrekTrCFhf3++lAngqMsUdp+wA/PhA9O1+2/aUICPrRUi2fzRrNkJeQ8MBO yRANiDE5xaofbVZ/U//TLcTztHpICN6DQbimcvZj1aXtTksbmx9eKyzQrxLZ+jim1bsh cJHw== X-Gm-Message-State: AOJu0YwAUElUev36qjl6ZRvvHCew3wrhhpz3DIrn139TbX23kgD8s2Al wVmJoz40VrFpgXrxq+c7VeoK4pnSKb5eNC4IyAElQyjw43TjnJd19SidnaRv X-Google-Smtp-Source: AGHT+IEz2CQEDhwPlA7ArYfiIwesaVzsW1AxmIuDI3OxUcoMAQ68nA3rBCxr2BClLO3cH+hOlte8Sg== X-Received: by 2002:ac2:4421:0:b0:513:76ec:2d21 with SMTP id w1-20020ac24421000000b0051376ec2d21mr1867047lfl.10.1711215323453; Sat, 23 Mar 2024 10:35:23 -0700 (PDT) Received: from surface-pro-6.. (79-139-171-253.dynamic.spd-mgts.ru. [79.139.171.253]) by smtp.gmail.com with ESMTPSA id g20-20020ac25394000000b00513973dee6fsm361290lfh.150.2024.03.23.10.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:35:23 -0700 (PDT) From: Sergey Bugaev <bugaevc@gmail.com> To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>, Luca <luca@orpolo.org> Subject: [PATCH v2 12/20] mach: Declare the new thread_set_self_state () trap Date: Sat, 23 Mar 2024 20:32:53 +0300 Message-ID: <20240323173301.151066-13-bugaevc@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240323173301.151066-1-bugaevc@gmail.com> References: <20240323173301.151066-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org |
Series |
aarch64-gnu port & GNU/Hurd on AArch64 progress
|
expand
|
diff --git a/sysdeps/mach/include/mach/mach_traps.h b/sysdeps/mach/include/mach/mach_traps.h index c4334952..a942212c 100644 --- a/sysdeps/mach/include/mach/mach_traps.h +++ b/sysdeps/mach/include/mach/mach_traps.h @@ -19,5 +19,12 @@ kern_return_t __thread_switch (mach_port_t new_thread, libc_hidden_proto (__thread_switch) kern_return_t __evc_wait (unsigned int event); libc_hidden_proto (__evc_wait) + +/* Set current thread's state, as if with thread_set_state() RPC. + This syscall is only really available in recent enough GNU Mach. */ +extern kern_return_t __thread_set_self_state (int flavor, + natural_t *new_state, + natural_t new_state_count); +libc_hidden_proto (__thread_set_self_state) #endif #endif
This is a new Mach trap for setting the state of the current thread, as if with thread_set_state () RPC. The trap has been added to GNU Mach as a part of the AArch64 port, to make it possible to implement sigreturn in glibc; however, the trap itself is fully arch-independent. There does not seem to be an easy way to feature-test, in a header, for existence of traps in the Mach version being built against. Instead, just declare the trap prototype unconditionally, and don't add an exported version for now. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> --- sysdeps/mach/include/mach/mach_traps.h | 7 +++++++ 1 file changed, 7 insertions(+)