예제 #1
0
파일: net.c 프로젝트: amohtasham/rstm
/* =============================================================================
 * 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);
    }
}
예제 #2
0
파일: net.c 프로젝트: amohtasham/rstm
/* =============================================================================
 * 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);
}
예제 #3
0
파일: net.c 프로젝트: 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);
}