Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2019 19:24:51 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r349679 - in stable/12/lib: libc/gen libc/include libthr/thread
Message-ID:  <201907031924.x63JOp9H063134@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Jul  3 19:24:50 2019
New Revision: 349679
URL: https://svnweb.freebsd.org/changeset/base/349679

Log:
  MFC r349299:
  Add libc stub for pthread_getthreadid_np(3).
  
  PR:	238650

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	Wed Jul  3 19:23:20 2019	(r349678)
+++ stable/12/lib/libc/gen/Symbol.map	Wed Jul  3 19:24:50 2019	(r349679)
@@ -338,6 +338,7 @@ FBSD_1.2 {
 	getutxid;
 	getutxline;
 	getutxuser;
+	pthread_getthreadid_np;
 	pututxline;
 	sem_close;
 	sem_destroy;

Modified: stable/12/lib/libc/gen/_pthread_stubs.c
==============================================================================
--- stable/12/lib/libc/gen/_pthread_stubs.c	Wed Jul  3 19:23:20 2019	(r349678)
+++ stable/12/lib/libc/gen/_pthread_stubs.c	Wed Jul  3 19:24:50 2019	(r349679)
@@ -130,6 +130,7 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = {
 	{PJT_DUAL_ENTRY(stub_zero)},	/* PJT_MUTEX_CONSISTENT */
 	{PJT_DUAL_ENTRY(stub_zero)},	/* PJT_MUTEXATTR_GETROBUST */
 	{PJT_DUAL_ENTRY(stub_zero)},	/* PJT_MUTEXATTR_SETROBUST */
+	{PJT_DUAL_ENTRY(stub_zero)},	/* PJT_GETTHREADID_NP */
 };
 
 /*
@@ -248,6 +249,7 @@ STUB_FUNC1(pthread_rwlock_trywrlock, PJT_RWLOCK_TRYWRL
 STUB_FUNC1(pthread_rwlock_unlock, PJT_RWLOCK_UNLOCK, int, void *)
 STUB_FUNC1(pthread_rwlock_wrlock, PJT_RWLOCK_WRLOCK, int, void *)
 STUB_FUNC(pthread_self,		PJT_SELF, pthread_t)
+STUB_FUNC(pthread_getthreadid_np, PJT_GETTHREADID_NP, int)
 STUB_FUNC2(pthread_setspecific, PJT_SETSPECIFIC, int, pthread_key_t, void *)
 STUB_FUNC3(pthread_sigmask, PJT_SIGMASK, int, int, void *, void *)
 STUB_FUNC3(pthread_atfork, PJT_ATFORK, int, void *, void *, void*)

Modified: stable/12/lib/libc/include/libc_private.h
==============================================================================
--- stable/12/lib/libc/include/libc_private.h	Wed Jul  3 19:23:20 2019	(r349678)
+++ stable/12/lib/libc/include/libc_private.h	Wed Jul  3 19:24:50 2019	(r349679)
@@ -176,6 +176,7 @@ typedef enum {
 	PJT_MUTEX_CONSISTENT,
 	PJT_MUTEXATTR_GETROBUST,
 	PJT_MUTEXATTR_SETROBUST,
+	PJT_GETTHREADID_NP,
 	PJT_MAX
 } pjt_index_t;
 

Modified: stable/12/lib/libthr/thread/thr_init.c
==============================================================================
--- stable/12/lib/libthr/thread/thr_init.c	Wed Jul  3 19:23:20 2019	(r349678)
+++ stable/12/lib/libthr/thread/thr_init.c	Wed Jul  3 19:24:50 2019	(r349679)
@@ -272,6 +272,7 @@ static pthread_func_t jmp_table[][2] = {
 	{DUAL_ENTRY(_pthread_mutex_consistent)},/* PJT_MUTEX_CONSISTENT */
 	{DUAL_ENTRY(_pthread_mutexattr_getrobust)},/* PJT_MUTEXATTR_GETROBUST */
 	{DUAL_ENTRY(_pthread_mutexattr_setrobust)},/* PJT_MUTEXATTR_SETROBUST */
+	{DUAL_ENTRY(_pthread_getthreadid_np)},	/* PJT_GETTHREADID_NP */
 };
 
 static int init_once = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907031924.x63JOp9H063134>