Patch for missing simptest header
This commit is contained in:
parent
60d5dcb4f5
commit
1af71e63ff
@ -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 <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
|
||||
- Remove pmix v1/2 backward compatibility subpackages
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
62
simptest.h
Normal file
62
simptest.h
Normal 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)
|
||||
|
Loading…
Reference in New Issue
Block a user