driver/lcd4linux: rework thread handling

Use std::thread for simplified handling.

Added bool exit_proc to allow left the thread callback, because if user
will change on/off/automatic modes inside the lcd4linux-setup menu,
he will be trapped in this menu and neutrino is never usable.
Btw. added some temporarily debug outputs to track this behavior.
This commit is contained in:
2021-06-06 13:53:08 +02:00
parent e1810b62a2
commit 6edf6e0a25
2 changed files with 38 additions and 24 deletions

View File

@@ -31,6 +31,7 @@
#define __lcd4l__
#include <string>
#include <thread>
class CLCD4l
{
@@ -66,8 +67,9 @@ class CLCD4l
void ResetParseID() { m_ParseID = 0; }
private:
pthread_t thrLCD4l;
std::thread *thrLCD4l;
static void* LCD4lProc(void *arg);
bool exit_proc;
struct tm *tm_struct;
bool wait4daemon;