
With Open MPI 5.0, the decision was made to stop building 3rd-party packages, such as Libevent, HWLOC, PMIx, and PRRTE as MCA components and instead 1) start relying on external libraries whenever possible and 2) Open MPI builds the 3rd party libraries (if needed) as independent libraries, rather than linked into libopen-pal. This patch moves libevent from an MCA framework to a stand-alone library built outside of OPAL. A wrapper in opal/util is provided to minimize the unnecessary changes in the rest of the code. When using the internal Libevent, it will be installed as a stand-alone libevent.a, instead of bundled in OPAL. Any pre-installed version of Libevent at or after 2.0.21 is preferred over the internal version. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
73 строки
2.3 KiB
C
73 строки
2.3 KiB
C
/*
|
|
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
|
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
|
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates.
|
|
* All Rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#ifndef OPAL_PROGRESS_THREADS_H
|
|
#define OPAL_PROGRESS_THREADS_H
|
|
|
|
#include "opal_config.h"
|
|
|
|
#include "opal/util/event.h"
|
|
|
|
|
|
/**
|
|
* Initialize a progress thread name; if a progress thread is not
|
|
* already associated with that name, start a progress thread.
|
|
*
|
|
* If you have general events that need to run in *a* progress thread
|
|
* (but not necessarily a your own, dedicated progress thread), pass
|
|
* NULL the "name" argument to the opal_progress_thead_init() function
|
|
* to glom on to the general OPAL-wide progress thread.
|
|
*
|
|
* If a name is passed that was already used in a prior call to
|
|
* opal_progress_thread_init(), the event base associated with that
|
|
* already-running progress thread will be returned (i.e., no new
|
|
* progress thread will be started).
|
|
*/
|
|
OPAL_DECLSPEC opal_event_base_t *opal_progress_thread_init(const char *name);
|
|
|
|
/**
|
|
* Finalize a progress thread name (reference counted).
|
|
*
|
|
* Once this function is invoked as many times as
|
|
* opal_progress_thread_init() was invoked on this name (or NULL), the
|
|
* progress function is shut down and the event base associated with
|
|
* it is destroyed.
|
|
*
|
|
* Will return OPAL_ERR_NOT_FOUND if the progress thread name does not
|
|
* exist; OPAL_SUCCESS otherwise.
|
|
*/
|
|
OPAL_DECLSPEC int opal_progress_thread_finalize(const char *name);
|
|
|
|
/**
|
|
* Temporarily pause the progress thread associated with this name.
|
|
*
|
|
* This function does not destroy the event base associated with this
|
|
* progress thread name, but it does stop processing all events on
|
|
* that event base until opal_progress_thread_resume() is invoked on
|
|
* that name.
|
|
*
|
|
* Will return OPAL_ERR_NOT_FOUND if the progress thread name does not
|
|
* exist; OPAL_SUCCESS otherwise.
|
|
*/
|
|
OPAL_DECLSPEC int opal_progress_thread_pause(const char *name);
|
|
|
|
/**
|
|
* Restart a previously-paused progress thread associated with this
|
|
* name.
|
|
*
|
|
* Will return OPAL_ERR_NOT_FOUND if the progress thread name does not
|
|
* exist; OPAL_SUCCESS otherwise.
|
|
*/
|
|
OPAL_DECLSPEC int opal_progress_thread_resume(const char *name);
|
|
|
|
#endif
|