• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ opal_event_del函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中opal_event_del函数的典型用法代码示例。如果您正苦于以下问题:C++ opal_event_del函数的具体用法?C++ opal_event_del怎么用?C++ opal_event_del使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了opal_event_del函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: pmix_server_peer_event_init

/*
 * Initialize events to be used by the peer instance for USOCK select/poll callbacks.
 */
void pmix_server_peer_event_init(pmix_server_peer_t* peer)
{
    if (peer->sd >= 0) {
        opal_event_set(orte_event_base,
                       &peer->recv_event,
                       peer->sd,
                       OPAL_EV_READ|OPAL_EV_PERSIST,
                       pmix_server_recv_handler,
                       peer);
        opal_event_set_priority(&peer->recv_event, ORTE_MSG_PRI);
        if (peer->recv_ev_active) {
            opal_event_del(&peer->recv_event);
            peer->recv_ev_active = false;
        }
        
        opal_event_set(orte_event_base,
                       &peer->send_event,
                       peer->sd,
                       OPAL_EV_WRITE|OPAL_EV_PERSIST,
                       pmix_server_send_handler,
                       peer);
        opal_event_set_priority(&peer->send_event, ORTE_MSG_PRI);
        if (peer->send_ev_active) {
            opal_event_del(&peer->send_event);
            peer->send_ev_active = false;
        }
    }
}
开发者ID:brminich,项目名称:ompi-mirror,代码行数:31,代码来源:pmix_server_connection.c


示例2: orte_ess_base_orted_finalize

int orte_ess_base_orted_finalize(void)
{
    /* stop the local sensors */
    orte_sensor.stop(ORTE_PROC_MY_NAME->jobid);
    
    if (signals_set) {
        /* Release all local signal handlers */
        opal_event_del(&epipe_handler);
        opal_event_del(&term_handler);
        opal_event_del(&int_handler);
#ifndef __WINDOWS__
        opal_event_signal_del(&sigusr1_handler);
        opal_event_signal_del(&sigusr2_handler);
#endif  /* __WINDOWS__ */
    }
    
    /* cleanup */
    if (NULL != log_path) {
        unlink(log_path);
    }
    
    /* make sure our local procs are dead */
    orte_odls.kill_local_procs(NULL);
    
    /* cleanup any lingering session directories */
    orte_session_dir_cleanup(ORTE_JOBID_WILDCARD);
     
    return ORTE_SUCCESS;    
}
开发者ID:hpc,项目名称:cce-mpi-openmpi-1.7.1,代码行数:29,代码来源:ess_base_std_orted.c


示例3: mca_btl_tcp_component_close

static int mca_btl_tcp_component_close(void)
{
    opal_list_item_t* item;
    opal_list_item_t* next;

    if(NULL != mca_btl_tcp_component.tcp_if_include) {
        free(mca_btl_tcp_component.tcp_if_include);
        mca_btl_tcp_component.tcp_if_include = NULL;
    }
    if(NULL != mca_btl_tcp_component.tcp_if_exclude) {
       free(mca_btl_tcp_component.tcp_if_exclude);
       mca_btl_tcp_component.tcp_if_exclude = NULL;
    }
    if (NULL != mca_btl_tcp_component.tcp_if_seq) {
        free(mca_btl_tcp_component.tcp_if_seq);
    }

    if (NULL != mca_btl_tcp_component.tcp_btls)
        free(mca_btl_tcp_component.tcp_btls);
 
    if (mca_btl_tcp_component.tcp_listen_sd >= 0) {
        opal_event_del(&mca_btl_tcp_component.tcp_recv_event);
        CLOSE_THE_SOCKET(mca_btl_tcp_component.tcp_listen_sd);
        mca_btl_tcp_component.tcp_listen_sd = -1;
    }
#if OPAL_WANT_IPV6
    if (mca_btl_tcp_component.tcp6_listen_sd >= 0) {
        opal_event_del(&mca_btl_tcp_component.tcp6_recv_event);
        CLOSE_THE_SOCKET(mca_btl_tcp_component.tcp6_listen_sd);
        mca_btl_tcp_component.tcp6_listen_sd = -1;
    }
#endif

    /* cleanup any pending events */
    OPAL_THREAD_LOCK(&mca_btl_tcp_component.tcp_lock);
    for(item =  opal_list_get_first(&mca_btl_tcp_component.tcp_events);
        item != opal_list_get_end(&mca_btl_tcp_component.tcp_events); 
        item = next) {
        mca_btl_tcp_event_t* event = (mca_btl_tcp_event_t*)item;
        next = opal_list_get_next(item);
        opal_event_del(&event->event);
        OBJ_RELEASE(event);
    }
    OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock);

    /* release resources */
    OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_procs);
    OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_events);
    OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_frag_eager);
    OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_frag_max);
    OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_frag_user);
    OBJ_DESTRUCT(&mca_btl_tcp_component.tcp_lock);

#ifdef __WINDOWS__
    WSACleanup();
#endif

    return OMPI_SUCCESS;
}
开发者ID:hknkkn,项目名称:ompi-svn-mirror,代码行数:59,代码来源:btl_tcp_component.c


示例4: mca_btl_sctp_component_close

int mca_btl_sctp_component_close(void)
{
    opal_list_item_t* item;
    opal_list_item_t* next;

    if(NULL != mca_btl_sctp_component.sctp_if_include) {
        free(mca_btl_sctp_component.sctp_if_include);
    }
    if(NULL != mca_btl_sctp_component.sctp_if_exclude) {
       free(mca_btl_sctp_component.sctp_if_exclude);
    }
    if (NULL != mca_btl_sctp_component.sctp_btls) {
        free(mca_btl_sctp_component.sctp_btls);
    }

    mca_btl_sctp_recv_handler_freebuf();
 
    if (mca_btl_sctp_component.sctp_listen_sd >= 0) {
        opal_event_del(&mca_btl_sctp_component.sctp_recv_event);
        CLOSE_THE_SOCKET(mca_btl_sctp_component.sctp_listen_sd);
        mca_btl_sctp_component.sctp_listen_sd = -1;
    }

    /* cleanup any pending events */
    OPAL_THREAD_LOCK(&mca_btl_sctp_component.sctp_lock);
    for(item =	opal_list_get_first(&mca_btl_sctp_component.sctp_events);
	item != opal_list_get_end(&mca_btl_sctp_component.sctp_events);
	item = next) {
	mca_btl_sctp_event_t* event = (mca_btl_sctp_event_t*)item;
	next = opal_list_get_next(item);
	opal_event_del(&event->event);
	OBJ_RELEASE(event);
    }
    OPAL_THREAD_UNLOCK(&mca_btl_sctp_component.sctp_lock);

    /* release resources */
    OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_procs);
#if MCA_BTL_SCTP_DONT_USE_HASH
    if(NULL != recvr_proc_table) {
        free(recvr_proc_table);
    }
    if(NULL != sender_proc_table) {
        free(sender_proc_table);
    }
#else
    OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_assocID_hash);
#endif
    OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_events);
    OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_frag_eager);
    OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_frag_max);
    OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_frag_user);
    OBJ_DESTRUCT(&mca_btl_sctp_component.sctp_lock);

#ifdef __WINDOWS__
    WSACleanup();
#endif

    return OMPI_SUCCESS;
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:59,代码来源:btl_sctp_component.c


示例5: bufferevent_free

void
bufferevent_free(struct bufferevent *bufev)
{
	opal_event_del(&bufev->ev_read);
	opal_event_del(&bufev->ev_write);

	evbuffer_free(bufev->input);
	evbuffer_free(bufev->output);

	free(bufev);
}
开发者ID:aosm,项目名称:openmpi,代码行数:11,代码来源:evbuffer.c


示例6: orcmd_finalize

static void orcmd_finalize(void)
{
    /* stop the local sensors */
    orcm_sensor.stop(ORTE_PROC_MY_NAME->jobid);
    (void) mca_base_framework_close(&orcm_sensor_base_framework);
    (void) mca_base_framework_close(&opal_pstat_base_framework);
    (void) mca_base_framework_close(&orcm_analytics_base_framework);

    if (signals_set) {
        /* Release all local signal handlers */
        opal_event_del(&epipe_handler);
        opal_event_del(&term_handler);
        opal_event_del(&int_handler);
        opal_event_signal_del(&sigusr1_handler);
        opal_event_signal_del(&sigusr2_handler);
    }

    /* cleanup */
    if (NULL != log_path) {
        unlink(log_path);
    }

    /* close frameworks */
    (void) mca_base_framework_close(&orcm_diag_base_framework);
    (void) mca_base_framework_close(&orte_filem_base_framework);
    (void) mca_base_framework_close(&orte_grpcomm_base_framework);
    (void) mca_base_framework_close(&orte_iof_base_framework);
    (void) mca_base_framework_close(&orte_notifier_base_framework);
    (void) mca_base_framework_close(&orte_errmgr_base_framework);
    (void) mca_base_framework_close(&orte_plm_base_framework);

    /* close the dfs so its threads can exit */
    (void) mca_base_framework_close(&orte_dfs_base_framework);

    /* make sure our local procs are dead */
    orte_odls.kill_local_procs(NULL);
    (void) mca_base_framework_close(&orte_odls_base_framework);
    (void) mca_base_framework_close(&orte_routed_base_framework);
    (void) mca_base_framework_close(&orte_rml_base_framework);
    (void) mca_base_framework_close(&orte_oob_base_framework);
    (void) mca_base_framework_close(&orte_state_base_framework);

    (void) mca_base_framework_close(&orcm_db_base_framework);
    (void) mca_base_framework_close(&opal_dstore_base_framework);
    (void) mca_base_framework_close(&orcm_evgen_base_framework);

    /* cleanup any lingering session directories */
    orte_session_dir_cleanup(ORTE_JOBID_WILDCARD);
}
开发者ID:htquach,项目名称:gemeter,代码行数:49,代码来源:sst_orcmd.c


示例7: bufferevent_disable

int
bufferevent_disable(struct bufferevent *bufev, short event)
{
	if (event & OPAL_EV_READ) {
		if (opal_event_del(&bufev->ev_read) == -1)
			return (-1);
	}
	if (event & OPAL_EV_WRITE) {
		if (opal_event_del(&bufev->ev_write) == -1)
			return (-1);
	}

	bufev->enabled &= ~event;
	return (0);
}
开发者ID:aosm,项目名称:openmpi,代码行数:15,代码来源:evbuffer.c


示例8: orte_iof_base_endpoint_closed

void orte_iof_base_endpoint_closed(orte_iof_base_endpoint_t* endpoint)
{
    /* For sinks: discard any fragments that were waiting to be
       written down the fd (because the process on the other side of
       the fd is no longer there -- we're just about to close the
       fd). */
    if (ORTE_IOF_SINK == endpoint->ep_mode) {
        while (NULL != opal_list_remove_first(&(endpoint->ep_sink_frags))) {
            continue;
        }

        /* Upper layer will take care of signaling any waiting
           condition variable -- no need to do it here */
    }

    /* Special case: if we're a sink and one of the special streams
       (stdout or stderr), don't close anything because we don't want
       to *actually* close stdout or stderr just because a remote
       process closes theirs (but we do if a remote source/stdin
       closes theirs, for example). */

    if (ORTE_IOF_SINK == endpoint->ep_mode &&
            (ORTE_IOF_STDOUT == endpoint->ep_tag ||
             ORTE_IOF_STDERR == endpoint->ep_tag)) {
        return;
    }

    /* remove any event handlers */
    opal_event_del(&endpoint->ep_event);

    /* close associated file descriptor */
    close(endpoint->ep_fd);
    endpoint->ep_fd = -1;
}
开发者ID:saurabhmaurya06,项目名称:Text-Summarization,代码行数:34,代码来源:iof_base_endpoint.c


示例9: stop

static void stop(orte_jobid_t jobid)
{
    opal_list_item_t *item;
    file_tracker_t *ft;
    
    /* cannot monitor my own job */
    if (jobid == ORTE_PROC_MY_NAME->jobid && ORTE_JOBID_WILDCARD != jobid) {
        return;
    }
    
    for (item = opal_list_get_first(&jobs);
         item != opal_list_get_end(&jobs);
         item = opal_list_get_next(item)) {
        ft = (file_tracker_t*)item;
        if (jobid == ft->jobid || ORTE_JOBID_WILDCARD == jobid) {
            opal_list_remove_item(&jobs, item);
            OBJ_RELEASE(item);
        }
    }
    /* if no jobs remain, stop the sampling */
    if (opal_list_is_empty(&jobs) && NULL != sample_ev) {
        opal_event_del(sample_ev);
        free(sample_ev);
        sample_ev = NULL;
    }
    return;
}
开发者ID:bringhurst,项目名称:ompi,代码行数:27,代码来源:sensor_file.c


示例10: orte_state_caddy_destruct

static void orte_state_caddy_destruct(orte_state_caddy_t *caddy)
{
    opal_event_del(&caddy->ev);
    if (NULL != caddy->jdata) {
        OBJ_RELEASE(caddy->jdata);
    }
}
开发者ID:pmix,项目名称:pmix-reference-server,代码行数:7,代码来源:state_base_frame.c


示例11: pmix_server_peer_connected

/*
 *  Setup peer state to reflect that connection has been established,
 *  and start any pending sends.
 */
void pmix_server_peer_connected(pmix_server_peer_t* peer)
{
    opal_output_verbose(2, pmix_server_output,
                        "%s-%s usock_peer_connected on socket %d",
                        ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
                        ORTE_NAME_PRINT(&(peer->name)), peer->sd);

    if (peer->timer_ev_active) {
        opal_event_del(&peer->timer_event);
        peer->timer_ev_active = false;
    }
    peer->state = PMIX_SERVER_CONNECTED;

    /* ensure the recv event is active */
    if (!peer->recv_ev_active) {
        opal_event_add(&peer->recv_event, 0);
        peer->recv_ev_active = true;
    }

    /* initiate send of first message on queue */
    if (NULL == peer->send_msg) {
        peer->send_msg = (pmix_server_send_t*)
            opal_list_remove_first(&peer->send_queue);
    }
    if (NULL != peer->send_msg && !peer->send_ev_active) {
        opal_event_add(&peer->send_event, 0);
        peer->send_ev_active = true;
    }
}
开发者ID:brminich,项目名称:ompi-mirror,代码行数:33,代码来源:pmix_server_connection.c


示例12: mca_oob_tcp_peer_complete_connect

/*
 * Check the status of the connection. If the connection failed, will retry
 * later. Otherwise, send this processes identifier to the peer on the
 * newly connected socket.
 */
static void mca_oob_tcp_peer_complete_connect(mca_oob_tcp_peer_t* peer)
{
    int so_error = 0;
    opal_socklen_t so_length = sizeof(so_error);

    /* unregister from receiving event notifications */
    opal_event_del(&peer->peer_send_event);

    /* check connect completion status */
    if(getsockopt(peer->peer_sd, SOL_SOCKET, SO_ERROR, (char *)&so_error, &so_length) < 0) {
        opal_output(0, "[%lu,%lu,%lu]-[%lu,%lu,%lu] mca_oob_tcp_peer_complete_connect: getsockopt() failed: %s (%d)\n", 
            ORTE_NAME_ARGS(orte_process_info.my_name),
            ORTE_NAME_ARGS(&(peer->peer_name)),
            strerror(opal_socket_errno),
            opal_socket_errno);
        mca_oob_tcp_peer_close(peer);
        return;
    }

    if(so_error == EINPROGRESS) {
        opal_event_add(&peer->peer_send_event, 0);
        return;
    } else if (so_error == ECONNREFUSED || so_error == ETIMEDOUT) {
        struct timeval tv = { 1,0 };
        if (mca_oob_tcp_component.tcp_debug >= OOB_TCP_DEBUG_CONNECT) {
            opal_output(0, "[%lu,%lu,%lu]-[%lu,%lu,%lu] mca_oob_tcp_peer_complete_connect: "
                        "connection failed: %s (%d) - retrying\n", 
                        ORTE_NAME_ARGS(orte_process_info.my_name),
                        ORTE_NAME_ARGS(&(peer->peer_name)),
                        strerror(so_error),
                        so_error);
        }
        mca_oob_tcp_peer_shutdown(peer);
        opal_evtimer_add(&peer->peer_timer_event, &tv);
        return;
    } else if(so_error != 0) {
        /* No need to worry about the return code here - we return regardless
           at this point, and if an error did occur a message has already been
           printed for the user */
        mca_oob_tcp_peer_try_connect(peer);
        return;
    }

    if(mca_oob_tcp_component.tcp_debug >= OOB_TCP_DEBUG_CONNECT) {
        opal_output(0, "[%lu,%lu,%lu]-[%lu,%lu,%lu] mca_oob_tcp_peer_complete_connect: "
                    "sending ack, %d",
                    ORTE_NAME_ARGS(orte_process_info.my_name),
                    ORTE_NAME_ARGS(&(peer->peer_name)), so_error);
    }

    if(mca_oob_tcp_peer_send_connect_ack(peer) == ORTE_SUCCESS) {
        peer->peer_state = MCA_OOB_TCP_CONNECT_ACK;
        opal_event_add(&peer->peer_recv_event, 0);
    } else {
        opal_output(0, "[%lu,%lu,%lu]-[%lu,%lu,%lu] mca_oob_tcp_peer_complete_connect: unable to send connect ack.",
            ORTE_NAME_ARGS(orte_process_info.my_name),
            ORTE_NAME_ARGS(&(peer->peer_name)));
        mca_oob_tcp_peer_close(peer);
    }
}
开发者ID:aosm,项目名称:openmpi,代码行数:65,代码来源:oob_tcp_peer.c


示例13: progress_engine

static void* progress_engine(opal_object_t *obj)
{
    /* define an event that will be used to kick us out of a blocking
     * situation when we want to exit
     */
    /* define an event that will be used to kick us out of a blocking
     * situation when we want to exit
     */
    opal_event_set(my_base, &stop_event,
                   progress_thread_pipe[0], OPAL_EV_READ, stop_handler, NULL);
    opal_event_add(&stop_event, 0);

    while (1) {
        OPAL_ACQUIRE_THREAD(&lock, &cond, &active);
        if (progress_thread_stop) {
            fprintf(stderr, "Thread stopping\n");
            OPAL_RELEASE_THREAD(&lock, &cond, &active);
            opal_event_del(&stop_event);
            return OPAL_THREAD_CANCELLED;
        }
        OPAL_RELEASE_THREAD(&lock, &cond, &active);
        fprintf(stderr, "Looping...\n");
        opal_event_loop(my_base, OPAL_EVLOOP_ONCE);
    }
}
开发者ID:cysheen,项目名称:ompi,代码行数:25,代码来源:evthread-test.c


示例14: mca_btl_tcp2_endpoint_close

/*
 * Remove any event registrations associated with the socket
 * and update the endpoint state to reflect the connection has
 * been closed.
 */
void mca_btl_tcp2_endpoint_close(mca_btl_base_endpoint_t* btl_endpoint)
{
    if(btl_endpoint->endpoint_sd < 0)
        return;
    btl_endpoint->endpoint_state = MCA_BTL_TCP_CLOSED;
    btl_endpoint->endpoint_retries++;
    opal_event_del(&btl_endpoint->endpoint_recv_event);
    opal_event_del(&btl_endpoint->endpoint_send_event);
    CLOSE_THE_SOCKET(btl_endpoint->endpoint_sd);
    btl_endpoint->endpoint_sd = -1;
#if MCA_BTL_TCP_ENDPOINT_CACHE
    free( btl_endpoint->endpoint_cache );
    btl_endpoint->endpoint_cache        = NULL;
    btl_endpoint->endpoint_cache_pos    = NULL;
    btl_endpoint->endpoint_cache_length = 0;
#endif  /* MCA_BTL_TCP_ENDPOINT_CACHE */
}
开发者ID:urids,项目名称:XSCALAMPI,代码行数:22,代码来源:btl_tcp2_endpoint.c


示例15: orte_ess_base_orted_finalize

int orte_ess_base_orted_finalize(void)
{
    if (signals_set) {
        /* Release all local signal handlers */
        opal_event_del(&epipe_handler);
        opal_event_del(&term_handler);
        opal_event_del(&int_handler);
        opal_event_signal_del(&sigusr1_handler);
        opal_event_signal_del(&sigusr2_handler);
    }
    /* cleanup */
    if (NULL != log_path) {
        unlink(log_path);
    }
    /* shutdown the pmix server */
    pmix_server_finalize();
    (void) mca_base_framework_close(&opal_pmix_base_framework);

    /* release the conduits */
    orte_rml.close_conduit(orte_mgmt_conduit);
    orte_rml.close_conduit(orte_coll_conduit);

    /* close frameworks */
    (void) mca_base_framework_close(&orte_filem_base_framework);
    (void) mca_base_framework_close(&orte_grpcomm_base_framework);
    (void) mca_base_framework_close(&orte_iof_base_framework);
    (void) mca_base_framework_close(&orte_errmgr_base_framework);
    (void) mca_base_framework_close(&orte_plm_base_framework);
    /* close the dfs so its threads can exit */
    (void) mca_base_framework_close(&orte_dfs_base_framework);
    /* make sure our local procs are dead */
    orte_odls.kill_local_procs(NULL);
    (void) mca_base_framework_close(&orte_rtc_base_framework);
    (void) mca_base_framework_close(&orte_odls_base_framework);
    (void) mca_base_framework_close(&orte_routed_base_framework);
    (void) mca_base_framework_close(&orte_rml_base_framework);
    (void) mca_base_framework_close(&orte_oob_base_framework);
    (void) mca_base_framework_close(&orte_state_base_framework);
    /* remove our use of the session directory tree */
    orte_session_dir_finalize(ORTE_PROC_MY_NAME);
    /* ensure we scrub the session directory tree */
    orte_session_dir_cleanup(ORTE_JOBID_WILDCARD);
    /* release the job hash table */
    OBJ_RELEASE(orte_job_data);
    return ORTE_SUCCESS;
}
开发者ID:jjhursey,项目名称:ompi,代码行数:46,代码来源:ess_base_std_orted.c


示例16: orte_iof_base_endpoint_destruct

static void orte_iof_base_endpoint_destruct(orte_iof_base_endpoint_t* endpoint)
{
    if(endpoint->ep_fd >= 0) {
        opal_event_del(&endpoint->ep_event);
    }
    OBJ_DESTRUCT(&endpoint->ep_source_frags);
    OBJ_DESTRUCT(&endpoint->ep_sink_frags);
    OBJ_DESTRUCT(&endpoint->ep_callbacks);
}
开发者ID:saurabhmaurya06,项目名称:Text-Summarization,代码行数:9,代码来源:iof_base_endpoint.c


示例17: stop

static void stop(orte_jobid_t jobid)
{
    if (NULL != sample_ev) {
        opal_event_del(sample_ev);
        free(sample_ev);
        sample_ev = NULL;
    }
    return;
}
开发者ID:hpc,项目名称:cce-mpi-openmpi-1.7.1,代码行数:9,代码来源:sensor_ft_tester.c


示例18: mca_btl_tcp2_endpoint_send_handler

static void mca_btl_tcp2_endpoint_send_handler(int sd, short flags, void* user)
{
    mca_btl_tcp2_endpoint_t* btl_endpoint = (mca_btl_tcp2_endpoint_t *)user;
    OPAL_THREAD_LOCK(&btl_endpoint->endpoint_send_lock);
    switch(btl_endpoint->endpoint_state) {
    case MCA_BTL_TCP_CONNECTING:
        mca_btl_tcp2_endpoint_complete_connect(btl_endpoint);
        break;
    case MCA_BTL_TCP_CONNECTED:
        /* complete the current send */
        while (NULL != btl_endpoint->endpoint_send_frag) {
            mca_btl_tcp2_frag_t* frag = btl_endpoint->endpoint_send_frag;
            int btl_ownership = (frag->base.des_flags & MCA_BTL_DES_FLAGS_BTL_OWNERSHIP);

            if(mca_btl_tcp2_frag_send(frag, btl_endpoint->endpoint_sd) == false) {
                break;
            }
            /* progress any pending sends */
            btl_endpoint->endpoint_send_frag = (mca_btl_tcp2_frag_t*)
                opal_list_remove_first(&btl_endpoint->endpoint_frags);

            /* if required - update request status and release fragment */
            OPAL_THREAD_UNLOCK(&btl_endpoint->endpoint_send_lock);
            assert( frag->base.des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK );
            frag->base.des_cbfunc(&frag->btl->super, frag->endpoint, &frag->base, frag->rc);
            if( btl_ownership ) {
                MCA_BTL_TCP_FRAG_RETURN(frag);
            }
            OPAL_THREAD_LOCK(&btl_endpoint->endpoint_send_lock);

        }

        /* if nothing else to do unregister for send event notifications */
        if(NULL == btl_endpoint->endpoint_send_frag) {
            opal_event_del(&btl_endpoint->endpoint_send_event);
        }
        break;
    default:
        BTL_ERROR(("invalid connection state (%d)", btl_endpoint->endpoint_state));
        opal_event_del(&btl_endpoint->endpoint_send_event);
        break;
    }
    OPAL_THREAD_UNLOCK(&btl_endpoint->endpoint_send_lock);
}
开发者ID:urids,项目名称:XSCALAMPI,代码行数:44,代码来源:btl_tcp2_endpoint.c


示例19: finalize

static void finalize(void)
{
    if (NULL != sample_ev) {
        opal_event_del(sample_ev);
        free(sample_ev);
        sample_ev = NULL;
    }
    
    return;
}
开发者ID:hpc,项目名称:cce-mpi-openmpi-1.7.1,代码行数:10,代码来源:sensor_ft_tester.c


示例20: send_handler

static void send_handler(int sd, short flags, void *arg)
{
    foo_caddy_t *foo = (foo_caddy_t*)arg;
    fprintf(stderr, "Deleting event\n");
    opal_event_del(&foo->write_event);
    OBJ_RELEASE(foo);
    fprintf(stderr, "Write event fired\n");
    fd_written = true; /* This needs a lock around it if you are reading it
                        * in the main thread and changing it here XXX */
}
开发者ID:cysheen,项目名称:ompi,代码行数:10,代码来源:evthread-test.c



注:本文中的opal_event_del函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ opal_list_append函数代码示例发布时间:2022-05-30
下一篇:
C++ opal_event_add函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap