Changeset 4076 for trunk/MagicSoft/Cosy/candrv
- Timestamp:
- 05/15/04 16:46:27 (21 years ago)
- Location:
- trunk/MagicSoft/Cosy/candrv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/candrv/sdolist.cc
r2518 r4076 20 20 void PendingSDOList::DelAll() 21 21 { 22 fMux.Lock(); 22 if (fMux.Lock()==13) 23 cout << "PendingSDOList::DelAll - mutex is already locked by this thread" << endl; 23 24 24 25 PendingSDO *prev = fFirst; … … 35 36 fLast = fFirst; 36 37 37 fMux.UnLock(); 38 if (fMux.UnLock()==13) 39 cout << "PendingSDOList::DelAll - tried to unlock mutex locked by other thread." << endl; 38 40 } 39 41 … … 42 44 PendingSDO *sdo = fFirst; 43 45 44 fMux.Lock(); 46 if (fMux.Lock()==13) 47 cout << "PendingSDOList::Add - mutex is already locked by this thread" << endl; 45 48 while ((sdo=sdo->Next)) 46 49 if (sdo->Node==node && sdo->Idx==idx && sdo->Subidx==subidx) … … 54 57 fLast->Next = new PendingSDO(node, idx, subidx); 55 58 fLast = fLast->Next; 56 fMux.UnLock(); 59 if (fMux.UnLock()==13) 60 cout << "PendingSDOList::Add - tried to unlock mutex locked by other thread." << endl; 57 61 } 58 62 … … 62 66 PendingSDO *sdo; 63 67 64 fMux.Lock(); 68 if (fMux.Lock()==13) 69 cout << "PendingSDOList::Del - mutex is already locked by this thread" << endl; 65 70 while ((sdo=prev->Next)) 66 71 { … … 80 85 break; 81 86 } 82 fMux.UnLock(); 87 if (fMux.UnLock()==13) 88 cout << "PendingSDOList::Del - tried to unlock mutex locked by other thread." << endl; 83 89 } 84 90 … … 93 99 PendingSDO *sdo = fFirst; 94 100 95 fMux.Lock(); 101 if (fMux.Lock()==13) 102 cout << "PendingSDOList::IsPending(byte) - mutex is already locked by this thread" << endl; 96 103 while ((sdo=sdo->Next)) 97 104 if (sdo->Node==node) … … 100 107 break; 101 108 } 102 fMux.UnLock(); 109 if (fMux.UnLock()==13) 110 cout << "PendingSDOList::IsPending(byte) - tried to unlock mutex locked by other thread." << endl; 103 111 104 112 return rc; … … 110 118 PendingSDO *sdo = fFirst; 111 119 112 fMux.Lock(); 120 if (fMux.Lock()==13) 121 cout << "PendingSDOList::IsPending - mutex is already locked by this thread" << endl; 113 122 while ((sdo=sdo->Next)) 114 123 if (sdo->Node==node && sdo->Idx==idx && sdo->Subidx==subidx) … … 117 126 break; 118 127 } 119 fMux.UnLock(); 128 if (fMux.UnLock()==13) 129 cout << "PendingSDOList::IsPending - tried to unlock mutex locked by other thread." << endl; 120 130 121 131 return rc; -
trunk/MagicSoft/Cosy/candrv/vmodican.cc
r2518 r4076 116 116 unsigned char c; 117 117 const int n = read(fd, &c, 1); 118 119 118 if (n<0) 120 119 { 121 120 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; 124 123 continue; 125 //return (void *)1;126 124 } 127 125 … … 936 934 // and switch the can bus communication on 937 935 // 938 VmodIcan::VmodIcan(const char *dev, const int baud, MLog &out) : Log(out), MThread(false, -10)//: CanDriver(dev, baud)936 VmodIcan::VmodIcan(const char *dev, const int baud, MLog &out) : Log(out), MThread(false, 10)//: CanDriver(dev, baud) 939 937 { 940 938 //
Note:
See TracChangeset
for help on using the changeset viewer.