Patch for missing simptest header

This commit is contained in:
Philip Kovacs 2021-10-08 14:07:29 -04:00
parent 60d5dcb4f5
commit 1af71e63ff
2 changed files with 67 additions and 1 deletions

View File

@ -5,6 +5,7 @@ Summary: Process Management Interface Exascale (PMIx)
License: BSD License: BSD
URL: https://pmix.org/ URL: https://pmix.org/
Source0: https://github.com/pmix/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2 Source0: https://github.com/pmix/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.bz2
Source1: simptest.h
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -57,12 +58,14 @@ based starters (e.g., mpirun).
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
cp %SOURCE1 test/simple
# touch lexer sources to recompile them # touch lexer sources to recompile them
find src -name \*.l -print -exec touch --no-create {} \; find src -name \*.l -print -exec touch --no-create {} \;
%build %build
%{_builddir}/%{name}-%{version}/autogen.pl %{_builddir}/%{name}-%{version}/autogen.pl
export CFLAGS="%{build_cflags} -Wno-unused-function -Wno-attributes"
%configure \ %configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir}/%{name} \ --sysconfdir=%{_sysconfdir}/%{name} \
@ -107,8 +110,9 @@ find %{buildroot} -name '*.la' | xargs rm -f
%{_bindir}/* %{_bindir}/*
%changelog %changelog
* Fri Oct 01 2021 Orion Poplawski <orion@nwra.com> - 4.1.0-1 * Fri Oct 08 2021 Philip Kovacs <pkfed@fedoraproject.org> - 4.1.0-1
- Update to 4.1.0 - Update to 4.1.0
- Remove pmix v1/2 backward compatibility subpackages
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-2 * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

62
simptest.h Normal file
View File

@ -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 <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
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)