From 1af71e63ff30b58e4e16919c87a1daf449448c98 Mon Sep 17 00:00:00 2001 From: Philip Kovacs Date: Fri, 8 Oct 2021 14:07:29 -0400 Subject: [PATCH] Patch for missing simptest header --- pmix.spec | 6 +++++- simptest.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 simptest.h diff --git a/pmix.spec b/pmix.spec index d40582b..2371a2f 100644 --- a/pmix.spec +++ b/pmix.spec @@ -5,6 +5,7 @@ Summary: Process Management Interface Exascale (PMIx) License: BSD URL: https://pmix.org/ Source0: https://github.com/pmix/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2 +Source1: simptest.h BuildRequires: autoconf BuildRequires: automake @@ -57,12 +58,14 @@ based starters (e.g., mpirun). %prep %setup -q -n %{name}-%{version} +cp %SOURCE1 test/simple # touch lexer sources to recompile them find src -name \*.l -print -exec touch --no-create {} \; %build %{_builddir}/%{name}-%{version}/autogen.pl +export CFLAGS="%{build_cflags} -Wno-unused-function -Wno-attributes" %configure \ --prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir}/%{name} \ @@ -107,8 +110,9 @@ find %{buildroot} -name '*.la' | xargs rm -f %{_bindir}/* %changelog -* Fri Oct 01 2021 Orion Poplawski - 4.1.0-1 +* Fri Oct 08 2021 Philip Kovacs - 4.1.0-1 - Update to 4.1.0 +- Remove pmix v1/2 backward compatibility subpackages * Fri Jul 23 2021 Fedora Release Engineering - 3.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/simptest.h b/simptest.h new file mode 100644 index 0000000..6482e17 --- /dev/null +++ b/simptest.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2018-2020 Intel, Inc. All rights reserved. + * Copyright (c) 2021 Nanook Consulting. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + * + */ + +#include +#include +#include +#include +#include + +typedef struct { + pthread_mutex_t mutex; + pthread_cond_t cond; + volatile bool active; + pmix_status_t status; +} mylock_t; + +#define DEBUG_CONSTRUCT_LOCK(l) \ + do { \ + pthread_mutex_init(&(l)->mutex, NULL); \ + pthread_cond_init(&(l)->cond, NULL); \ + (l)->active = true; \ + (l)->status = PMIX_SUCCESS; \ + } while (0) + +#define DEBUG_DESTRUCT_LOCK(l) \ + do { \ + pthread_mutex_destroy(&(l)->mutex); \ + pthread_cond_destroy(&(l)->cond); \ + } while (0) + +#define DEBUG_WAIT_THREAD(lck) \ + do { \ + pthread_mutex_lock(&(lck)->mutex); \ + while ((lck)->active) { \ + pthread_cond_wait(&(lck)->cond, &(lck)->mutex); \ + } \ + pthread_mutex_unlock(&(lck)->mutex); \ + } while (0) + +#define DEBUG_WAKEUP_THREAD(lck) \ + do { \ + pthread_mutex_lock(&(lck)->mutex); \ + (lck)->active = false; \ + pthread_cond_broadcast(&(lck)->cond); \ + pthread_mutex_unlock(&(lck)->mutex); \ + } while (0) + +#define SIMPTEST_THREADSHIFT(r, c) \ + do { \ + pmix_event_assign(&((r)->ev), simptest_evbase, -1, EV_WRITE, (c), (r)); \ + PMIX_POST_OBJECT((r)); \ + pmix_event_active(&((r)->ev), EV_WRITE, 1); \ + } while (0) +