MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / Process

Method Process

src/libcec/adapter/Pulse-Eight/USBCECAdapterMessageQueue.cpp:335–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void *CCECAdapterMessageQueue::Process(void)
336{
337 CCECAdapterMessageQueueEntry *message(NULL);
338 while (!IsStopped())
339 {
340 /* wait for a new message */
341 if (m_writeQueue.Pop(message, MESSAGE_QUEUE_SIGNAL_WAIT_TIME) && message)
342 {
343 /* write this message */
344 {
345 CLockObject lock(m_mutex);
346 m_com->WriteToDevice(message->m_message);
347 }
348 if (message->m_message->state == ADAPTER_MESSAGE_STATE_ERROR ||
349 message->m_message->Message() == MSGCODE_START_BOOTLOADER)
350 {
351 message->Signal();
352 Clear();
353 break;
354 }
355 }
356
357 CheckTimedOutMessages();
358 }
359 return NULL;
360}
361
362void CCECAdapterMessageQueue::CheckTimedOutMessages(void)
363{

Callers

nothing calls this directly

Calls 5

ClearFunction · 0.85
PopMethod · 0.80
WriteToDeviceMethod · 0.80
MessageMethod · 0.80
SignalMethod · 0.80

Tested by

no test coverage detected