Ignore:
Timestamp:
05/15/04 16:46:27 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/candrv
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/candrv/sdolist.cc

    r2518 r4076  
    2020void PendingSDOList::DelAll()
    2121{
    22     fMux.Lock();
     22    if (fMux.Lock()==13)
     23        cout << "PendingSDOList::DelAll - mutex is already locked by this thread" << endl;
    2324
    2425    PendingSDO *prev = fFirst;
     
    3536    fLast  = fFirst;
    3637
    37     fMux.UnLock();
     38    if (fMux.UnLock()==13)
     39        cout << "PendingSDOList::DelAll - tried to unlock mutex locked by other thread." << endl;
    3840}
    3941
     
    4244    PendingSDO *sdo = fFirst;
    4345
    44     fMux.Lock();
     46    if (fMux.Lock()==13)
     47        cout << "PendingSDOList::Add - mutex is already locked by this thread" << endl;
    4548    while ((sdo=sdo->Next))
    4649        if (sdo->Node==node && sdo->Idx==idx && sdo->Subidx==subidx)
     
    5457    fLast->Next = new PendingSDO(node, idx, subidx);
    5558    fLast = fLast->Next;
    56     fMux.UnLock();
     59    if (fMux.UnLock()==13)
     60        cout << "PendingSDOList::Add - tried to unlock mutex locked by other thread." << endl;
    5761}
    5862
     
    6266    PendingSDO *sdo;
    6367
    64     fMux.Lock();
     68    if (fMux.Lock()==13)
     69        cout << "PendingSDOList::Del - mutex is already locked by this thread" << endl;
    6570    while ((sdo=prev->Next))
    6671    {
     
    8085        break;
    8186    }
    82     fMux.UnLock();
     87    if (fMux.UnLock()==13)
     88        cout << "PendingSDOList::Del - tried to unlock mutex locked by other thread." << endl;
    8389}
    8490
     
    9399    PendingSDO *sdo = fFirst;
    94100
    95     fMux.Lock();
     101    if (fMux.Lock()==13)
     102        cout << "PendingSDOList::IsPending(byte) - mutex is already locked by this thread" << endl;
    96103    while ((sdo=sdo->Next))
    97104        if (sdo->Node==node)
     
    100107            break;
    101108        }
    102     fMux.UnLock();
     109    if (fMux.UnLock()==13)
     110        cout << "PendingSDOList::IsPending(byte) - tried to unlock mutex locked by other thread." << endl;
    103111
    104112    return rc;
     
    110118    PendingSDO *sdo = fFirst;
    111119
    112     fMux.Lock();
     120    if (fMux.Lock()==13)
     121        cout << "PendingSDOList::IsPending - mutex is already locked by this thread" << endl;
    113122    while ((sdo=sdo->Next))
    114123        if (sdo->Node==node && sdo->Idx==idx && sdo->Subidx==subidx)
     
    117126            break;
    118127        }
    119     fMux.UnLock();
     128    if (fMux.UnLock()==13)
     129        cout << "PendingSDOList::IsPending - tried to unlock mutex locked by other thread." << endl;
    120130
    121131    return rc;
  • trunk/MagicSoft/Cosy/candrv/vmodican.cc

    r2518 r4076  
    116116        unsigned char c;
    117117        const int n = read(fd, &c, 1);
    118 
    119118        if (n<0)
    120119        {
    121120            cerr << "Vmodican: read(" << dec << (int)fd << "," << (void*)&c;
    122             cerr << ",1) returned c=" << (int)c << " '" << strerror(errno);
    123             cerr << "' (errno = " << errno << ")" << endl;
     121            cerr << ",1) returned rc=" << n << " c=" << (int)c << " '";
     122            cerr << strerror(errno) << "' (errno = " << errno << ")" << endl;
    124123            continue;
    125             //return (void *)1;
    126124        }
    127125
     
    936934//  and switch the can bus communication on
    937935//
    938 VmodIcan::VmodIcan(const char *dev, const int baud, MLog &out) : Log(out), MThread(false, -10)//: CanDriver(dev, baud)
     936VmodIcan::VmodIcan(const char *dev, const int baud, MLog &out) : Log(out), MThread(false, 10)//: CanDriver(dev, baud)
    939937{
    940938    //
Note: See TracChangeset for help on using the changeset viewer.