Beispiel #1
0
static void net_cleanup(void)
{
    qthread_debug(MULTINODE_FUNCTIONS, "[%d] begin net_cleanup\n", my_rank);

    if (my_rank == 0) {
        int i;
        for (i = 1; i < world_size; ++i) {
            struct die_msg_t msg;

            msg.my_rank = my_rank;
            qthread_debug(MULTINODE_DETAILS, "[%d] sending die message to %d\n", my_rank, i);
            qthread_internal_net_driver_send(i, DIE_MSG_TAG, &msg, sizeof(msg));
        }

        while (num_ended != world_size - 1) SPINLOCK_BODY();
    }

    qthread_internal_net_driver_finalize();

    qt_hash_destroy(uid_to_ptr_hash);
    qt_hash_destroy(ptr_to_uid_hash);

    qthread_debug(MULTINODE_FUNCTIONS, "[%d] end net_cleanup\n", my_rank);
}
void qt_dictionary_destroy(qt_dictionary *d)
{
    qt_hash_destroy(d);
}