Skip to content

Commit

Permalink
Merge pull request openucx#1367 from alex-mikheev/topic/uct_progress_…
Browse files Browse the repository at this point in the history
…api_try2

UCT: adds enable/disable progress API
  • Loading branch information
shamisp authored May 18, 2017
2 parents 6f9d5bc + 1de1ba6 commit 3d479e2
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/uct/api/uct.h
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,54 @@ ucs_status_t uct_wakeup_wait(uct_wakeup_h wakeup);
ucs_status_t uct_wakeup_signal(uct_wakeup_h wakeup);


/**
* @ingroup UCT_RESOURCE
* @brief UCT progress types
*/
enum uct_progress_types {
UCT_PROGRESS_RX = UCS_BIT(0), /**< progress UCT receive operations */
UCT_PROGRESS_TX = UCS_BIT(1) /**< progress UCT send operations */
};


/**
* @ingroup UCT_RESOURCE
* @brief Enable synchronous progress for the interface
*
* Notify the transport that it should do work
* during @ref uct_worker_progress().
* Thus the latency of the transport may be reduced.
*
* The function can be called from any context or thread.
*
* By default, progress is enabled when the interface is created.
*
* @param [in] iface The interface to enable progress.
* @param [in] flags What kind progress to enable. See @ref uct_progress_types
*
*/
void uct_iface_progress_enable(uct_iface_h iface, unsigned flags);


/**
* @ingroup UCT_RESOURCE
* @brief Disable synchronous progress for the interface
*
* Notify the transport that it should avoid doing anything
* during @ref uct_worker_progress(). Thus the latency of
* other transports may be reduced.
*
* The function can be called from any context or thread.
*
* By default, progress is enabled when the interface is created.
*
* @param [in] iface The interface to disable progress.
* @param [in] flags What kind of progress to disable. See @ref uct_progress_types
*
*/
void uct_iface_progress_disable(uct_iface_h iface, unsigned flags);


/**
* @ingroup UCT_RESOURCE
*/
Expand Down

0 comments on commit 3d479e2

Please sign in to comment.