Skip to content

Commit

Permalink
Silence TSan data race warning.
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel K. Gutierrez <samuel@lanl.gov>
(cherry picked from commit aa498b9)
  • Loading branch information
samuelkgutierrez authored and rhc54 committed Apr 20, 2023
1 parent 89806eb commit ac7c80d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/include/prte_stdatomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
* Copyright (c) 2021 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
* Copyright (c) 2023 Triad National Security, LLC. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -18,6 +19,7 @@
# define PRTE_STDATOMIC_H

# include "prte_stdint.h"
# include <stdbool.h>

# if PRTE_ATOMIC_C11

Expand All @@ -26,6 +28,7 @@
typedef atomic_int prte_atomic_int_t;
typedef atomic_long prte_atomic_long_t;

typedef _Atomic bool prte_atomic_bool_t;
typedef _Atomic int32_t prte_atomic_int32_t;
typedef _Atomic uint32_t prte_atomic_uint32_t;
typedef _Atomic int64_t prte_atomic_int64_t;
Expand All @@ -41,6 +44,7 @@ typedef _Atomic uintptr_t prte_atomic_uintptr_t;
typedef volatile int prte_atomic_int_t;
typedef volatile long prte_atomic_long_t;

typedef volatile bool prte_atomic_bool_t;
typedef volatile int32_t prte_atomic_int32_t;
typedef volatile uint32_t prte_atomic_uint32_t;
typedef volatile int64_t prte_atomic_int64_t;
Expand Down
4 changes: 3 additions & 1 deletion src/mca/oob/tcp/oob_tcp_component.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* Copyright (c) 2023 Triad National Security, LLC. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -34,6 +35,7 @@
# include <sys/time.h>
#endif

#include "src/include/prte_stdatomic.h"
#include "src/class/pmix_bitmap.h"
#include "src/class/pmix_list.h"
#include "src/class/pmix_pointer_array.h"
Expand Down Expand Up @@ -79,7 +81,7 @@ typedef struct {
int num_hnp_ports; /**< number of ports the HNP should listen on */
pmix_list_t listeners; /**< List of sockets being monitored by event or thread */
pmix_thread_t listen_thread; /**< handle to the listening thread */
bool listen_thread_active;
prte_atomic_bool_t listen_thread_active;
struct timeval listen_thread_tv; /**< Timeout when using listen thread */
int stop_thread[2]; /**< pipe used to exit the listen thread */
int keepalive_probes; /**< number of keepalives that can be missed before declaring error */
Expand Down

0 comments on commit ac7c80d

Please sign in to comment.