From owner-svn-src-stable@freebsd.org Sat Dec 5 09:08:28 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C208473F6B; Sat, 5 Dec 2020 09:08:28 +0000 (UTC) (envelope-from kib@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cp3dm10Ztz3Cjb; Sat, 5 Dec 2020 09:08:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10E611B5C6; Sat, 5 Dec 2020 09:08:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B598Rb6010701; Sat, 5 Dec 2020 09:08:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B598RxB010698; Sat, 5 Dec 2020 09:08:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012050908.0B598RxB010698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 5 Dec 2020 09:08:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368361 - in stable/12/lib: libc/gen libc/include libthr/thread X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/lib: libc/gen libc/include libthr/thread X-SVN-Commit-Revision: 368361 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2020 09:08:28 -0000 Author: kib Date: Sat Dec 5 09:08:26 2020 New Revision: 368361 URL: https://svnweb.freebsd.org/changeset/base/368361 Log: MFC r368125: libc: Add pthread_attr_get_np(3) stub, reporting ESRCH. PR: 251112 Modified: stable/12/lib/libc/gen/Symbol.map stable/12/lib/libc/gen/_pthread_stubs.c stable/12/lib/libc/include/libc_private.h stable/12/lib/libthr/thread/thr_init.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/gen/Symbol.map ============================================================================== --- stable/12/lib/libc/gen/Symbol.map Sat Dec 5 05:56:23 2020 (r368360) +++ stable/12/lib/libc/gen/Symbol.map Sat Dec 5 09:08:26 2020 (r368361) @@ -6,6 +6,7 @@ FBSD_1.0 { __xuname; pthread_atfork; pthread_attr_destroy; + pthread_attr_get_np; pthread_attr_getdetachstate; pthread_attr_getguardsize; pthread_attr_getinheritsched; Modified: stable/12/lib/libc/gen/_pthread_stubs.c ============================================================================== --- stable/12/lib/libc/gen/_pthread_stubs.c Sat Dec 5 05:56:23 2020 (r368360) +++ stable/12/lib/libc/gen/_pthread_stubs.c Sat Dec 5 09:08:26 2020 (r368361) @@ -59,6 +59,7 @@ static int stub_zero(void); static int stub_fail(void); static int stub_true(void); static void stub_exit(void); +static int stub_esrch(void); #define PJT_DUAL_ENTRY(entry) \ (pthread_func_t)entry, (pthread_func_t)entry @@ -131,6 +132,7 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = { [PJT_MUTEXATTR_GETROBUST] = {PJT_DUAL_ENTRY(stub_zero)}, [PJT_MUTEXATTR_SETROBUST] = {PJT_DUAL_ENTRY(stub_zero)}, [PJT_GETTHREADID_NP] = {PJT_DUAL_ENTRY(stub_zero)}, + [PJT_ATTR_GET_NP] = {PJT_DUAL_ENTRY(stub_esrch)}, }; /* @@ -288,6 +290,7 @@ STUB_FUNC3(__pthread_cleanup_push_imp, PJT_CLEANUP_PUS void *, void *) STUB_FUNC1(_pthread_cancel_enter, PJT_CANCEL_ENTER, void, int) STUB_FUNC1(_pthread_cancel_leave, PJT_CANCEL_LEAVE, void, int) +STUB_FUNC2(pthread_attr_get_np, PJT_ATTR_GET_NP, int, pthread_t, pthread_attr_t *) static int stub_zero(void) @@ -329,4 +332,10 @@ static void stub_exit(void) { exit(0); +} + +static int +stub_esrch(void) +{ + return (ESRCH); } Modified: stable/12/lib/libc/include/libc_private.h ============================================================================== --- stable/12/lib/libc/include/libc_private.h Sat Dec 5 05:56:23 2020 (r368360) +++ stable/12/lib/libc/include/libc_private.h Sat Dec 5 09:08:26 2020 (r368361) @@ -177,6 +177,7 @@ typedef enum { PJT_MUTEXATTR_GETROBUST, PJT_MUTEXATTR_SETROBUST, PJT_GETTHREADID_NP, + PJT_ATTR_GET_NP, PJT_MAX } pjt_index_t; Modified: stable/12/lib/libthr/thread/thr_init.c ============================================================================== --- stable/12/lib/libthr/thread/thr_init.c Sat Dec 5 05:56:23 2020 (r368360) +++ stable/12/lib/libthr/thread/thr_init.c Sat Dec 5 09:08:26 2020 (r368361) @@ -271,6 +271,7 @@ static pthread_func_t jmp_table[][2] = { [PJT_MUTEXATTR_GETROBUST] = {DUAL_ENTRY(_thr_mutexattr_getrobust)}, [PJT_MUTEXATTR_SETROBUST] = {DUAL_ENTRY(_thr_mutexattr_setrobust)}, [PJT_GETTHREADID_NP] = {DUAL_ENTRY(_thr_getthreadid_np)}, + [PJT_ATTR_GET_NP] = {DUAL_ENTRY(_thr_attr_get_np)}, }; static int init_once = 0;