| 67 | |
| 68 | |
| 69 | void* ClockLoopAdapter(TransceiverManager *transceiver) |
| 70 | { |
| 71 | // This loop checks the clock messages from the transceiver. |
| 72 | // These messages keep the BTS clock in sync with the hardware, |
| 73 | // and also serve as a heartbeat for the radiomodem. |
| 74 | |
| 75 | // This is a convenient place for other periodic housekeeping as well. |
| 76 | |
| 77 | // This loop has a period of about 3 seconds. |
| 78 | |
| 79 | gResetWatchdog(); |
| 80 | while (1) { |
| 81 | transceiver->clockHandler(); |
| 82 | LOG(DEBUG) << "watchdog timer expires in " << gWatchdogRemaining() << " seconds"; |
| 83 | if (gWatchdogExpired()) { |
| 84 | LOG(ALERT) << "restarting OpenBTS on expiration of watchdog timer"; |
| 85 | gReports.incr("OpenBTS.Exit.Error.Watchdog"); |
| 86 | exit(-2); |
| 87 | } |
| 88 | } |
| 89 | return NULL; |
| 90 | } |
| 91 | |
| 92 | |
| 93 |
nothing calls this directly
no test coverage detected