| 286 | } |
| 287 | |
| 288 | int start_loop(bool block) override { |
| 289 | if (workth) LOG_ERROR_RETURN(EALREADY, -1, "Already listening"); |
| 290 | m_block_serv = block; |
| 291 | if (block) return accept_loop(); |
| 292 | auto loop = &KernelSocketServer::accept_loop; |
| 293 | auto th = thread_create((thread_entry&)loop, this); |
| 294 | thread_enable_join(th); |
| 295 | thread_yield_to(th); |
| 296 | return 0; |
| 297 | } |
| 298 | |
| 299 | void terminate() final { |
| 300 | if (!workth) return; |
nothing calls this directly
no test coverage detected