Skip to content

Commit 0f6541b

Browse files
committed
threads: improve pthreads comp configury
use the OPAL_CONFIG_POSIX_THREADS macro Signed-off-by: Howard Pritchard <howardp@lanl.gov>
1 parent de72219 commit 0f6541b

21 files changed

+44
-9
lines changed

opal/mca/threads/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
1212
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
1314
# $COPYRIGHT$
1415
#
1516
# Additional copyrights may follow

opal/mca/threads/base/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
# University of Stuttgart. All rights reserved.
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
12+
# Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
13+
#
1214
# $COPYRIGHT$
1315
#
1416
# Additional copyrights may follow
@@ -18,7 +20,7 @@
1820

1921
headers += \
2022
base/base.h \
21-
base/threads_base_null.h
23+
base/threads_base_null.h
2224

2325
libmca_threads_la_SOURCES += \
2426
base/threads_base_open.c

opal/mca/threads/base/base.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
14+
*
1315
* $COPYRIGHT$
1416
*
1517
* Additional copyrights may follow

opal/mca/threads/base/threads_base_null.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12+
* Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
1213
* $COPYRIGHT$
1314
*
1415
* Additional copyrights may follow
@@ -23,23 +24,29 @@ int opal_condition_t_class;
2324
int opal_mutex_t_class;
2425
int opal_recursive_mutex_t_class;
2526

26-
int opal_thread_join(opal_thread_t *t, void **thr_return) {
27+
int opal_thread_join(opal_thread_t *t, void **thr_return)
28+
{
2729
return 0;
2830
}
2931

30-
void opal_thread_set_main() {
32+
void opal_thread_set_main()
33+
{
3134
return 0;
3235
}
33-
int opal_thread_start(opal_thread_t *t) {
36+
int opal_thread_start(opal_thread_t *t)
37+
{
3438
return 0;
3539
}
40+
3641
int *opal_thread_t_class = NULL;
3742

3843
int opal_tsd_key_create(opal_tsd_key_t *key, opal_tsd_destructor_t destructor)
3944
{
4045
return 0;
4146
}
47+
4248
int opal_uses_threads = 0;
49+
4350
int opal_tsd_keys_destruct()
4451
{
4552
return 0;

opal/mca/threads/base/threads_base_open.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
14+
*
1315
* $COPYRIGHT$
1416
*
1517
* Additional copyrights may follow

opal/mca/threads/condition.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* reserved.
1414
* Copyright (c) 2015 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
16+
* Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
17+
*
1618
* $COPYRIGHT$
1719
*
1820
* Additional copyrights may follow

opal/mca/threads/configure.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dnl University of Stuttgart. All rights reserved.
1111
dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212
dnl All rights reserved.
1313
dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
14+
dnl Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
1415
dnl $COPYRIGHT$
1516
dnl
1617
dnl Additional copyrights may follow

opal/mca/threads/mutex.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* reserved.
1616
* Copyright (c) 2007 Voltaire. All rights reserved.
1717
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
18+
* Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
1819
*
1920
* $COPYRIGHT$
2021
*

opal/mca/threads/pthreads/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
1212
# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
1314
# $COPYRIGHT$
1415
#
1516
# Additional copyrights may follow

opal/mca/threads/pthreads/configure.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
1414
# Copyright (c) 2015 Research Organization for Information Science
1515
# and Technology (RIST). All rights reserved.
16+
# Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
17+
# Copyright (c) 2019 Triad National Security, LLC. All rights
1618
# $COPYRIGHT$
1719
#
1820
# Additional copyrights may follow
@@ -50,10 +52,8 @@ AC_DEFUN([MCA_opal_threads_pthreads_CONFIG],[
5052
[threads_pthreads_happy="no"])])
5153

5254
AS_IF([test "$threads_pthreads_happy" = "yes"],
53-
[AC_CHECK_HEADERS([mach/mach_time.h])
54-
AC_CHECK_FUNC([mach_absolute_time],
55-
[threads_pthreads_happy="yes"],
56-
[threads_pthreads_happy="no"])])
55+
[OPAL_CONFIG_POSIX_THREADS([threads_pthreads_happy="yes"],
56+
[threads_pthreads_happy="no"])])
5757

5858
AS_IF([test "$threads_pthreads_happy" = "no" && \
5959
test "$threads_pthreads_should_use" = "1"],

0 commit comments

Comments
 (0)