| 1032 | |
| 1033 | #if UNUSED_BUT_SAVE_FOR_UMTS // but may be used for UTMS |
| 1034 | void CSL3StateMachine::csl3ServiceLoop() |
| 1035 | { |
| 1036 | if (IS_LOG_LEVEL(DEBUG)) { |
| 1037 | ostringstream os; |
| 1038 | os <<"Transaction Table:"; |
| 1039 | if (gNewTransactionTable.dump(os,true)) { LOG(DEBUG)<<os.str(); } |
| 1040 | } |
| 1041 | try { |
| 1042 | int timeout = -1; |
| 1043 | // Process all messages in the queue first, for no particular reason. |
| 1044 | if (mCSL3Fifo.size() == 0) { |
| 1045 | // Invoke Procedures to process timeouts and also determine the next timeout. |
| 1046 | timeout = csl3HandleTimers(); |
| 1047 | } |
| 1048 | GenericL3Msg *msg; |
| 1049 | if (timeout >= 0) { |
| 1050 | msg = mCSL3Fifo.read(timeout); // wait only until the next timer expires. |
| 1051 | LOG(DEBUG) "read(timeout="<<timeout<<") returned:"<<msg; |
| 1052 | } else { |
| 1053 | msg = mCSL3Fifo.read(); // wait forever. |
| 1054 | LOG(DEBUG) "read() returned:"<<msg; |
| 1055 | } |
| 1056 | gResetWatchdog(); |
| 1057 | if (msg) { // If timeout, there will be no msg. |
| 1058 | csl3HandleMsg(msg); |
| 1059 | } |
| 1060 | } |
| 1061 | // FIXME: copy catch code from DCCHDispatcher() |
| 1062 | catch (...) { |
| 1063 | LOG(ERR) << "unhandled exception in CSL3StateMachine"; |
| 1064 | } |
| 1065 | } |
| 1066 | |
| 1067 | |
| 1068 | static void *csl3ThreadLoop(void *unusedArg) |
no test coverage detected