Skip to content

Commit 683efcb

Browse files
author
Ralph Castain
committed
Rename the current opal_event_base to opal_sync_event_base in preparation for adding an async progress thread to opal. No functional changes made here - just a simple rename.
1 parent 053d9b2 commit 683efcb

17 files changed

+30
-29
lines changed

ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Copyright (c) 2010-2012 Oracle and/or its affiliates. All rights reserved.
99
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
1010
* reserved.
11+
* Copyright (c) 2015 Intel, Inc. All rights reserved.
1112
* $COPYRIGHT$
1213
*
1314
* Additional copyrights may follow
@@ -32,7 +33,6 @@
3233

3334
#include "opal/util/opal_environ.h"
3435
#include "ompi/mca/mca.h"
35-
#include "opal/mca/base/base.h"
3636
#include "opal/mca/pmix/pmix.h"
3737

3838
#include "ompi/request/request.h"
@@ -4440,7 +4440,7 @@ static int ft_event_exchange_bookmarks(void)
44404440
/* Wait for all bookmarks to arrive */
44414441
START_TIMER(CRCP_TIMER_CKPT_EX_WAIT);
44424442
while( total_recv_bookmarks > 0 ) {
4443-
opal_event_loop(opal_event_base, OPAL_EVLOOP_NONBLOCK);
4443+
opal_event_loop(opal_sync_event_base, OPAL_EVLOOP_NONBLOCK);
44444444
}
44454445
total_recv_bookmarks = 0;
44464446
END_TIMER(CRCP_TIMER_CKPT_EX_WAIT);
@@ -5227,7 +5227,7 @@ static int wait_quiesce_drain_ack(void)
52275227
}
52285228
}
52295229

5230-
opal_event_loop(opal_event_base, OPAL_EVLOOP_NONBLOCK);
5230+
opal_event_loop(opal_sync_event_base, OPAL_EVLOOP_NONBLOCK);
52315231
}
52325232

52335233
/* Clear the ack queue if it isn't already clear (it should already be) */

opal/mca/btl/openib/btl_openib_fd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static int service_pipe_cmd_add_fd(bool use_libevent, cmd_t *cmd)
175175
if (use_libevent) {
176176
/* Make an event for this fd */
177177
ri->ri_event_used = true;
178-
opal_event_set(opal_event_base, &ri->ri_event, ri->ri_fd,
178+
opal_event_set(opal_sync_event_base, &ri->ri_event, ri->ri_fd,
179179
ri->ri_flags | OPAL_EV_PERSIST, service_fd_callback,
180180
ri);
181181
opal_event_add(&ri->ri_event, 0);
@@ -501,7 +501,7 @@ int opal_btl_openib_fd_init(void)
501501

502502
/* Create a libevent event that is used in the main thread
503503
to watch its pipe */
504-
opal_event_set(opal_event_base, &main_thread_event, pipe_to_main_thread[0],
504+
opal_event_set(opal_sync_event_base, &main_thread_event, pipe_to_main_thread[0],
505505
OPAL_EV_READ | OPAL_EV_PERSIST,
506506
main_thread_event_callback, NULL);
507507
opal_event_add(&main_thread_event, 0);

opal/mca/btl/openib/connect/btl_openib_connect_udcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2212,7 +2212,7 @@ static void udcm_sent_message_constructor (udcm_message_sent_t *message)
22122212
{
22132213
memset ((char *)message + sizeof (message->super), 0,
22142214
sizeof (*message) - sizeof (message->super));
2215-
opal_event_evtimer_set(opal_event_base, &message->event, udcm_send_timeout, message);
2215+
opal_event_evtimer_set(opal_sync_event_base, &message->event, udcm_send_timeout, message);
22162216
}
22172217

22182218
static void udcm_sent_message_destructor (udcm_message_sent_t *message)

opal/mca/btl/tcp/btl_tcp_component.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ static int mca_btl_tcp_component_create_listen(uint16_t af_family)
818818
/* register listen port */
819819
#if OPAL_ENABLE_IPV6
820820
if (AF_INET6 == af_family) {
821-
opal_event_set(opal_event_base, &mca_btl_tcp_component.tcp6_recv_event,
821+
opal_event_set(opal_sync_event_base, &mca_btl_tcp_component.tcp6_recv_event,
822822
mca_btl_tcp_component.tcp6_listen_sd,
823823
OPAL_EV_READ|OPAL_EV_PERSIST,
824824
mca_btl_tcp_component_accept_handler,
@@ -827,7 +827,7 @@ static int mca_btl_tcp_component_create_listen(uint16_t af_family)
827827
} else
828828
#endif
829829
{
830-
opal_event_set(opal_event_base, &mca_btl_tcp_component.tcp_recv_event,
830+
opal_event_set(opal_sync_event_base, &mca_btl_tcp_component.tcp_recv_event,
831831
mca_btl_tcp_component.tcp_listen_sd,
832832
OPAL_EV_READ|OPAL_EV_PERSIST,
833833
mca_btl_tcp_component_accept_handler,
@@ -1049,7 +1049,7 @@ static void mca_btl_tcp_component_accept_handler( int incoming_sd,
10491049

10501050
/* wait for receipt of peers process identifier to complete this connection */
10511051
event = OBJ_NEW(mca_btl_tcp_event_t);
1052-
opal_event_set(opal_event_base, &event->event, sd, OPAL_EV_READ, mca_btl_tcp_component_recv_handler, event);
1052+
opal_event_set(opal_sync_event_base, &event->event, sd, OPAL_EV_READ, mca_btl_tcp_component_recv_handler, event);
10531053
opal_event_add(&event->event, 0);
10541054
}
10551055
}

opal/mca/btl/tcp/btl_tcp_endpoint.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static inline void mca_btl_tcp_endpoint_event_init(mca_btl_base_endpoint_t* btl_
309309
btl_endpoint->endpoint_cache_pos = btl_endpoint->endpoint_cache;
310310
#endif /* MCA_BTL_TCP_ENDPOINT_CACHE */
311311

312-
opal_event_set(opal_event_base, &btl_endpoint->endpoint_recv_event,
312+
opal_event_set(opal_sync_event_base, &btl_endpoint->endpoint_recv_event,
313313
btl_endpoint->endpoint_sd,
314314
OPAL_EV_READ|OPAL_EV_PERSIST,
315315
mca_btl_tcp_endpoint_recv_handler,
@@ -320,7 +320,7 @@ static inline void mca_btl_tcp_endpoint_event_init(mca_btl_base_endpoint_t* btl_
320320
* will be fired only once, and when the endpoint is marked as
321321
* CONNECTED the event should be recreated with the correct flags.
322322
*/
323-
opal_event_set(opal_event_base, &btl_endpoint->endpoint_send_event,
323+
opal_event_set(opal_sync_event_base, &btl_endpoint->endpoint_send_event,
324324
btl_endpoint->endpoint_sd,
325325
OPAL_EV_WRITE,
326326
mca_btl_tcp_endpoint_send_handler,
@@ -509,7 +509,7 @@ void mca_btl_tcp_endpoint_accept(mca_btl_base_endpoint_t* btl_endpoint,
509509
assert(btl_endpoint->endpoint_sd_next == -1);
510510
btl_endpoint->endpoint_sd_next = sd;
511511

512-
opal_event_evtimer_set(opal_event_base, &btl_endpoint->endpoint_accept_event,
512+
opal_event_evtimer_set(opal_sync_event_base, &btl_endpoint->endpoint_accept_event,
513513
mca_btl_tcp_endpoint_complete_accept, btl_endpoint);
514514
opal_event_add(&btl_endpoint->endpoint_accept_event, &now);
515515
}
@@ -570,7 +570,7 @@ static void mca_btl_tcp_endpoint_connected(mca_btl_base_endpoint_t* btl_endpoint
570570
MCA_BTL_TCP_ENDPOINT_DUMP(1, btl_endpoint, true, "READY [endpoint_connected]");
571571

572572
/* Create the send event in a persistent manner. */
573-
opal_event_set(opal_event_base, &btl_endpoint->endpoint_send_event,
573+
opal_event_set(opal_sync_event_base, &btl_endpoint->endpoint_send_event,
574574
btl_endpoint->endpoint_sd,
575575
OPAL_EV_WRITE | OPAL_EV_PERSIST,
576576
mca_btl_tcp_endpoint_send_handler,

opal/mca/btl/usnic/btl_usnic_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules,
972972
}
973973

974974
/* start timer to guarantee synthetic clock advances */
975-
opal_event_set(opal_event_base, &usnic_clock_timer_event,
975+
opal_event_set(opal_sync_event_base, &usnic_clock_timer_event,
976976
-1, 0, usnic_clock_callback,
977977
&usnic_clock_timeout);
978978
usnic_clock_timer_event_set = true;

opal/mca/btl/usnic/btl_usnic_endpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static void endpoint_construct(mca_btl_base_endpoint_t* endpoint)
8787
OBJ_CONSTRUCT(&endpoint->endpoint_hotel, opal_hotel_t);
8888
opal_hotel_init(&endpoint->endpoint_hotel,
8989
WINDOW_SIZE,
90-
opal_event_base,
90+
opal_sync_event_base,
9191
mca_btl_usnic_component.retrans_timeout,
9292
0,
9393
opal_btl_usnic_ack_timeout);

opal/mca/btl/usnic/btl_usnic_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,7 @@ static void init_async_event(opal_btl_usnic_module_t *module)
20682068
}
20692069

20702070
/* Get the fd to receive events on this device */
2071-
opal_event_set(opal_event_base, &(module->device_async_event), fd,
2071+
opal_event_set(opal_sync_event_base, &(module->device_async_event), fd,
20722072
OPAL_EV_READ | OPAL_EV_PERSIST,
20732073
module_async_event_callback, module);
20742074
opal_event_add(&(module->device_async_event), NULL);

opal/mca/btl/usnic/btl_usnic_stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ int opal_btl_usnic_stats_init(opal_btl_usnic_module_t *module)
212212
module->stats.timeout.tv_sec = mca_btl_usnic_component.stats_frequency;
213213
module->stats.timeout.tv_usec = 0;
214214

215-
opal_event_set(opal_event_base, &(module->stats.timer_event),
215+
opal_event_set(opal_sync_event_base, &(module->stats.timer_event),
216216
-1, EV_TIMEOUT | EV_PERSIST,
217217
&usnic_stats_callback, module);
218218
opal_event_add(&(module->stats.timer_event),

opal/mca/event/base/event_base_frame.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static int opal_event_base_close(void)
6464
/*
6565
* Globals
6666
*/
67-
opal_event_base_t *opal_event_base=NULL;
67+
opal_event_base_t *opal_sync_event_base=NULL;
6868

6969
static int opal_event_base_open(mca_base_open_flag_t flags)
7070
{
@@ -84,13 +84,13 @@ static int opal_event_base_open(mca_base_open_flag_t flags)
8484
opal_event_use_threads();
8585

8686
/* get our event base */
87-
if (NULL == (opal_event_base = opal_event_base_create())) {
87+
if (NULL == (opal_sync_event_base = opal_event_base_create())) {
8888
return OPAL_ERROR;
8989
}
9090

9191
/* set the number of priorities */
9292
if (0 < OPAL_EVENT_NUM_PRI) {
93-
opal_event_base_priority_init(opal_event_base, OPAL_EVENT_NUM_PRI);
93+
opal_event_base_priority_init(opal_sync_event_base, OPAL_EVENT_NUM_PRI);
9494
}
9595

9696
return rc;

opal/mca/event/event.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
44
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
5-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
5+
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
66
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
77
* reserved.
88
*

opal/mca/event/external/external.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved.
33
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
4+
* Copyright (c) 2015 Intel, Inc. All rights reserved.
45
*
56
* $COPYRIGHT$
67
*
@@ -27,7 +28,7 @@ BEGIN_C_DECLS
2728
typedef struct event_base opal_event_base_t;
2829
typedef struct event opal_event_t;
2930

30-
OPAL_DECLSPEC extern opal_event_base_t *opal_event_base;
31+
OPAL_DECLSPEC extern opal_event_base_t *opal_sync_event_base;
3132

3233
#define OPAL_EV_TIMEOUT EV_TIMEOUT
3334
#define OPAL_EV_READ EV_READ

opal/mca/event/libevent2022/libevent2022.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ BEGIN_C_DECLS
6767
typedef struct event_base opal_event_base_t;
6868
typedef struct event opal_event_t;
6969

70-
OPAL_DECLSPEC extern opal_event_base_t *opal_event_base;
70+
OPAL_DECLSPEC extern opal_event_base_t *opal_sync_event_base;
7171

7272
#define OPAL_EV_TIMEOUT EV_TIMEOUT
7373
#define OPAL_EV_READ EV_READ

opal/runtime/opal_cr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ int opal_cr_coord(int state)
811811
* Otherwise it may/will use stale file descriptors which will disrupt
812812
* the intended users of the soon-to-be newly assigned file descriptors.
813813
*/
814-
opal_event_reinit(opal_event_base);
814+
opal_event_reinit(opal_sync_event_base);
815815

816816
/*
817817
* Flush if() functionality, since it caches system specific info.

opal/runtime/opal_progress.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ opal_progress(void)
168168
event_progress_last_time = (num_event_users > 0) ?
169169
now - event_progress_delta : now;
170170

171-
events += opal_event_loop(opal_event_base, opal_progress_event_flag);
171+
events += opal_event_loop(opal_sync_event_base, opal_progress_event_flag);
172172
}
173173

174174
#else /* OPAL_PROGRESS_USE_TIMERS */
@@ -177,7 +177,7 @@ opal_progress(void)
177177
if (OPAL_THREAD_ADD32(&event_progress_counter, -1) <= 0 ) {
178178
event_progress_counter =
179179
(num_event_users > 0) ? 0 : event_progress_delta;
180-
events += opal_event_loop(opal_event_base, opal_progress_event_flag);
180+
events += opal_event_loop(opal_sync_event_base, opal_progress_event_flag);
181181
}
182182
#endif /* OPAL_PROGRESS_USE_TIMERS */
183183

orte/runtime/orte_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags)
226226
* start their progress thread in ess_base_std_app.c
227227
* at the appropriate point
228228
*/
229-
orte_event_base = opal_event_base;
229+
orte_event_base = opal_sync_event_base;
230230
}
231231

232232
/* initialize the RTE for this environment */

orte/tools/orte-server/orte-server.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ int main(int argc, char *argv[])
238238
/* Set signal handlers to catch kill signals so we can properly clean up
239239
* after ourselves.
240240
*/
241-
opal_event_set(opal_event_base, &term_handler, SIGTERM, OPAL_EV_SIGNAL,
241+
opal_event_set(orte_event_base, &term_handler, SIGTERM, OPAL_EV_SIGNAL,
242242
shutdown_callback, NULL);
243243
opal_event_add(&term_handler, NULL);
244-
opal_event_set(opal_event_base, &int_handler, SIGINT, OPAL_EV_SIGNAL,
244+
opal_event_set(orte_event_base, &int_handler, SIGINT, OPAL_EV_SIGNAL,
245245
shutdown_callback, NULL);
246246
opal_event_add(&int_handler, NULL);
247247

0 commit comments

Comments
 (0)