Example #1
0
/* =============================================================================
 * TMnet_applyOperation
 * =============================================================================
 */
void
TMnet_applyOperation (TM_ARGDECL
                      net_t* netPtr, operation_t op, long fromId, long toId)
{
    switch (op) {
        case OPERATION_INSERT:  TMinsertEdge(TM_ARG   netPtr, fromId, toId); break;
        case OPERATION_REMOVE:  TMremoveEdge(TM_ARG   netPtr, fromId, toId); break;
        case OPERATION_REVERSE: TMreverseEdge(TM_ARG  netPtr, fromId, toId); break;
        default:
            assert(0);
    }
}
Example #2
0
/* =============================================================================
 * TMreverseEdge
 * =============================================================================
 */
static void
TMreverseEdge (TM_ARGDECL  net_t* netPtr, long fromId, long toId)
{
    TMremoveEdge(TM_ARG  netPtr, fromId, toId);
    TMinsertEdge(TM_ARG  netPtr, toId, fromId);
}
Example #3
0
File: net.c Project: takayuki/al
static void
TMreverseEdge (al_t* lock, net_t* netPtr, long fromId, long toId)
{
    TMremoveEdge(lock, netPtr, fromId, toId);
    TMinsertEdge(lock, netPtr, toId, fromId);
}