Revert "changed raspi to own thread class"

This reverts commit 467f6976f7.
This commit is contained in:
max_10
2018-09-20 16:58:06 +02:00
committed by Thilo Graf
parent b3d05f59bf
commit 89ab7c86dc
4 changed files with 14 additions and 13 deletions

View File

@@ -10,7 +10,8 @@ AM_CPPFLAGS += \
AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing
AM_LDFLAGS = \ AM_LDFLAGS = \
-L/opt/vc/lib/ -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -L/opt/vc/lib/ -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt \
-lOpenThreads
libraspi_la_SOURCES = \ libraspi_la_SOURCES = \
hardware_caps.c \ hardware_caps.c \

View File

@@ -19,7 +19,7 @@
*/ */
#include <vector> #include <vector>
#include <condition_abstraction.h> #include <OpenThreads/Condition>
#include "glfb.h" #include "glfb.h"
#include "bcm_host.h" #include "bcm_host.h"
@@ -47,8 +47,8 @@ static int curr_res;
static int pitch; static int pitch;
static VC_IMAGE_TYPE_T type = VC_IMAGE_ARGB8888; static VC_IMAGE_TYPE_T type = VC_IMAGE_ARGB8888;
static Mutex blit_mutex; static OpenThreads::Mutex blit_mutex;
static Condition blit_cond; static OpenThreads::Condition blit_cond;
static bool goodbye = false; /* if set main loop is left */ static bool goodbye = false; /* if set main loop is left */
static bool ready = false; /* condition predicate */ static bool ready = false; /* condition predicate */
@@ -71,7 +71,7 @@ GLFramebuffer::GLFramebuffer(int x, int y)
si.red.offset = 16; si.red.offset = 16;
si.transp.offset = 24; si.transp.offset = 24;
Thread::start(); OpenThreads::Thread::start();
while (!ready) while (!ready)
usleep(1); usleep(1);
} }
@@ -80,7 +80,7 @@ GLFramebuffer::~GLFramebuffer()
{ {
goodbye = true; goodbye = true;
blit(); /* wake up thread */ blit(); /* wake up thread */
Thread::join(); OpenThreads::Thread::join();
} }
void GLFramebuffer::run() void GLFramebuffer::run()

View File

@@ -17,11 +17,11 @@
#ifndef __glthread__ #ifndef __glthread__
#define __glthread__ #define __glthread__
#include <thread_abstraction.h> #include <OpenThreads/Thread>
#include <vector> #include <vector>
#include <linux/fb.h> /* for screeninfo etc. */ #include <linux/fb.h> /* for screeninfo etc. */
class GLFramebuffer : public Thread class GLFramebuffer : public OpenThreads::Thread
{ {
public: public:
GLFramebuffer(int x, int y); GLFramebuffer(int x, int y);
@@ -34,7 +34,7 @@ private:
void *pdata; /* not yet used */ void *pdata; /* not yet used */
fb_var_screeninfo si; fb_var_screeninfo si;
std::vector<unsigned char> osd_buf; /* silly bounce buffer */ std::vector<unsigned char> osd_buf; /* silly bounce buffer */
void run(); /* for Thread */ void run(); /* for OpenThreads::Thread */
void setup(); void setup();
void blit_osd(); void blit_osd();

View File

@@ -32,7 +32,7 @@
#include <set> #include <set>
#include <map> #include <map>
#include <thread_abstraction.h> #include <OpenThreads/Thread>
#include "init_td.h" #include "init_td.h"
#include "lt_debug.h" #include "lt_debug.h"
@@ -69,7 +69,7 @@ static void init_keymap(void)
kmap[KEY_F8] = KEY_SLEEP; kmap[KEY_F8] = KEY_SLEEP;
} }
class Input: public Thread class Input: public OpenThreads::Thread
{ {
public: public:
Input(); Input();
@@ -82,13 +82,13 @@ class Input: public Thread
Input::Input() Input::Input()
{ {
Init(); Init();
Thread::start(); start();
} }
Input::~Input() Input::~Input()
{ {
running = false; running = false;
Thread::join(); join();
} }
static int dirfilter(const struct dirent *d) static int dirfilter(const struct dirent *d)