MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / csl3ServiceLoop

Method csl3ServiceLoop

Control/L3StateMachine.cpp:1034–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1032
1033#if UNUSED_BUT_SAVE_FOR_UMTS // but may be used for UTMS
1034void 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
1068static void *csl3ThreadLoop(void *unusedArg)

Callers 1

csl3ThreadLoopFunction · 0.80

Calls 5

gResetWatchdogFunction · 0.85
dumpMethod · 0.45
strMethod · 0.45
sizeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected