Allow compilation when there is a progress thread.
This commit was SVN r14776.
Этот коммит содержится в:
родитель
8b817e96fd
Коммит
eb43abf7ae
@ -220,7 +220,10 @@ ompi_osc_rdma_component_finalize(void)
|
|||||||
#if OMPI_ENABLE_PROGRESS_THREADS
|
#if OMPI_ENABLE_PROGRESS_THREADS
|
||||||
mca_osc_rdma_component.c_thread_run = false;
|
mca_osc_rdma_component.c_thread_run = false;
|
||||||
opal_condition_broadcast(&ompi_request_cond);
|
opal_condition_broadcast(&ompi_request_cond);
|
||||||
|
{
|
||||||
|
void* ret;
|
||||||
opal_thread_join(&mca_osc_rdma_component.c_thread, &ret);
|
opal_thread_join(&mca_osc_rdma_component.c_thread, &ret);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
opal_progress_unregister(ompi_osc_rdma_component_progress);
|
opal_progress_unregister(ompi_osc_rdma_component_progress);
|
||||||
#endif
|
#endif
|
||||||
@ -734,7 +737,7 @@ ompi_osc_rdma_component_progress(void)
|
|||||||
int ret, done = 0;
|
int ret, done = 0;
|
||||||
|
|
||||||
#if OMPI_ENABLE_PROGRESS_THREADS
|
#if OMPI_ENABLE_PROGRESS_THREADS
|
||||||
ret = OPAL_THREAD_LOCK(&mca_osc_rdma_component.c_lock);
|
OPAL_THREAD_LOCK(&mca_osc_rdma_component.c_lock);
|
||||||
#else
|
#else
|
||||||
ret = OPAL_THREAD_TRYLOCK(&mca_osc_rdma_component.c_lock);
|
ret = OPAL_THREAD_TRYLOCK(&mca_osc_rdma_component.c_lock);
|
||||||
#endif
|
#endif
|
||||||
@ -760,7 +763,7 @@ ompi_osc_rdma_component_progress(void)
|
|||||||
#else
|
#else
|
||||||
ret = ompi_request_test(&longreq->request,
|
ret = ompi_request_test(&longreq->request,
|
||||||
&done,
|
&done,
|
||||||
&longreq->status);
|
0);
|
||||||
#endif
|
#endif
|
||||||
if (OMPI_SUCCESS == ret && 0 != done) {
|
if (OMPI_SUCCESS == ret && 0 != done) {
|
||||||
opal_list_remove_item(&mca_osc_rdma_component.c_pending_requests,
|
opal_list_remove_item(&mca_osc_rdma_component.c_pending_requests,
|
||||||
@ -788,7 +791,7 @@ component_thread_fn(opal_object_t *obj)
|
|||||||
/* wake up whenever a request completes, to make sure it's not
|
/* wake up whenever a request completes, to make sure it's not
|
||||||
for us */
|
for us */
|
||||||
waittime.tv_sec = 1;
|
waittime.tv_sec = 1;
|
||||||
waittime.tv_usec = 0;
|
waittime.tv_nsec = 0;
|
||||||
OPAL_THREAD_LOCK(&ompi_request_lock);
|
OPAL_THREAD_LOCK(&ompi_request_lock);
|
||||||
opal_condition_timedwait(&ompi_request_cond, &ompi_request_lock, &waittime);
|
opal_condition_timedwait(&ompi_request_cond, &ompi_request_lock, &waittime);
|
||||||
OPAL_THREAD_UNLOCK(&ompi_request_lock);
|
OPAL_THREAD_UNLOCK(&ompi_request_lock);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user