From nobody Thu Nov 14 03:08:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XplTs6Cbyz5d02j; Thu, 14 Nov 2024 03:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XplTs5jMqz4FLV; Thu, 14 Nov 2024 03:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731553713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFEpHpYitxg4ImNABDkp7r2eEl1X+IQVQBZ9eYwDZPk=; b=TxIcU/azx5X5UDJ2gzR7VYDJA1q35C/Ol0hIsBobv/xw2xuZLyz4wVKAx1mv+y7pj/dnm7 4t/LvHY97Ox11lKn9sWPmSXWV0LlwQ1vhbybs3/GyPXfPgYDBFFNv+R8db9Zmay+4pgopd 3AnOPEfq0Gnczw9PX8rTHs4MjgKfWklhr47+IpHoJF5tQSwadUTFjLAMwaHXhKIJ84GxvZ owoXV8aEqS9DJSWzgKXLc7csfBtk88c/eTU6rLKhRmwnRJDL4ZTXjk/TmqZ4uL79xD+YLo 9YU0+IdC684Qd2BfNZfLlGliCCCGOdkQTsc/5D7s/dqvAaxgWvwYKOk9whavAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731553713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFEpHpYitxg4ImNABDkp7r2eEl1X+IQVQBZ9eYwDZPk=; b=omQw2b9TmyL+d6dxn7Ap33guPEOM4oC198c3smNKxKgQLwNAJ5ke1ohvYigDZTyw/pAg0R mz09QZPgqwxwCE4tCPSc2/2IkuW0OUeRVNwN0VxAk27fUIybgSt5ZGZAwfu2YrhyvMfbOT 5pxoM5nZK1KV8tO2r1vNCRLi0M19ED739kRUxzNuAIoPy0rcUBoFiLr72JwKqc/ucl8fUn z/UtUfuaZqVbtpc2ensRHWsAYyqZ9W+i9Dz+g/cSdCvb667ODrV7pNO89vY+i2DtGUThXR Q1fShV2cPKdB5UHsyYi1pXQ6RqDPMzuiU1DDuW1F2Tw1TwfrLCtxhAm//Ar0KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731553713; a=rsa-sha256; cv=none; b=Ga4aV+BW+NkQHbX40+nFmR1trySMP9+p/tN+CmLIQrUTv1S8SAjNVgZvagP8p85I34Dt6T aUUpRq7EO2ShOqtH45QBV8BnRmQ9qLxgnC6fNgfdzcGkgs+v+6KiXkK6QmCeiGlYo9a3DE csDRDdGGfUe7Y6nliH7FlthGAQvNpYFpZwiaoe59Oy4DRh/gIjTMMF9qds7F0n1TTrcuPs DUng7hDeKdX50AAQg/gZR877gurIdArQrHyOIXYKBgJtxu3GH0HksJpasJvVh9qaclupZN XzhVtMHDTYtZYeXrKfykO9V0/lnSBm83KaO8jGheCyUfyKVvB1I0qdH7fDzr0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XplTs5JBTzLTV; Thu, 14 Nov 2024 03:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE38Xgc088793; Thu, 14 Nov 2024 03:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE38X3h088790; Thu, 14 Nov 2024 03:08:33 GMT (envelope-from git) Date: Thu, 14 Nov 2024 03:08:33 GMT Message-Id: <202411140308.4AE38X3h088790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 3cc3d71efe29 - main - libc: fix the stubs for pthread_{suspend,resume}_all_np List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cc3d71efe299ed222dc2b6cd5af365ef35f76a7 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc3d71efe299ed222dc2b6cd5af365ef35f76a7 commit 3cc3d71efe299ed222dc2b6cd5af365ef35f76a7 Author: Kyle Evans AuthorDate: 2024-11-14 03:05:22 +0000 Commit: Kyle Evans CommitDate: 2024-11-14 03:08:02 +0000 libc: fix the stubs for pthread_{suspend,resume}_all_np Noticed just a little too late, stub_null returns a `void *` but these prototypes have no return value. As far as I know, all of our archs will throw the return value in a caller-saved register and it'll simply be ignored, but it's probably worth being more accurate. Fixes: 83aafcdc8892 ("libc, libthr: coordinate stubs for [...]") --- lib/libc/gen/_pthread_stubs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/_pthread_stubs.c b/lib/libc/gen/_pthread_stubs.c index 9df9ec9b8599..2a0cebadd5fd 100644 --- a/lib/libc/gen/_pthread_stubs.c +++ b/lib/libc/gen/_pthread_stubs.c @@ -50,6 +50,7 @@ struct pthread { static struct pthread main_thread; static int stub_main(void); +static void stub_void(void); static void *stub_null(void); static struct pthread *stub_self(void); static int stub_zero(void); @@ -132,8 +133,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { [PJT_GETTHREADID_NP] = {PJT_DUAL_ENTRY(stub_zero)}, [PJT_ATTR_GET_NP] = {PJT_DUAL_ENTRY(stub_esrch)}, [PJT_GETNAME_NP] = {PJT_DUAL_ENTRY(stub_getname_np)}, - [PJT_SUSPEND_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)}, - [PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)}, + [PJT_SUSPEND_ALL_NP] = {PJT_DUAL_ENTRY(stub_void)}, + [PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_void)}, }; /* @@ -302,6 +303,12 @@ stub_zero(void) return (0); } +static void +stub_void(void) +{ + +} + static void * stub_null(void) {