mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
changed raspi to own thread class
This commit is contained in:
@@ -10,8 +10,7 @@ AM_CPPFLAGS += \
|
||||
AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing
|
||||
|
||||
AM_LDFLAGS = \
|
||||
-L/opt/vc/lib/ -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt \
|
||||
-lOpenThreads
|
||||
-L/opt/vc/lib/ -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt
|
||||
|
||||
libraspi_la_SOURCES = \
|
||||
hardware_caps.c \
|
||||
|
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include <OpenThreads/Condition>
|
||||
#include <condition_abstraction.h>
|
||||
|
||||
#include "glfb.h"
|
||||
#include "bcm_host.h"
|
||||
@@ -47,8 +47,8 @@ static int curr_res;
|
||||
static int pitch;
|
||||
static VC_IMAGE_TYPE_T type = VC_IMAGE_ARGB8888;
|
||||
|
||||
static OpenThreads::Mutex blit_mutex;
|
||||
static OpenThreads::Condition blit_cond;
|
||||
static Mutex blit_mutex;
|
||||
static Condition blit_cond;
|
||||
|
||||
static bool goodbye = false; /* if set main loop is left */
|
||||
static bool ready = false; /* condition predicate */
|
||||
@@ -71,7 +71,7 @@ GLFramebuffer::GLFramebuffer(int x, int y)
|
||||
si.red.offset = 16;
|
||||
si.transp.offset = 24;
|
||||
|
||||
OpenThreads::Thread::start();
|
||||
Thread::start();
|
||||
while (!ready)
|
||||
usleep(1);
|
||||
}
|
||||
@@ -80,7 +80,7 @@ GLFramebuffer::~GLFramebuffer()
|
||||
{
|
||||
goodbye = true;
|
||||
blit(); /* wake up thread */
|
||||
OpenThreads::Thread::join();
|
||||
Thread::join();
|
||||
}
|
||||
|
||||
void GLFramebuffer::run()
|
||||
|
@@ -17,11 +17,11 @@
|
||||
|
||||
#ifndef __glthread__
|
||||
#define __glthread__
|
||||
#include <OpenThreads/Thread>
|
||||
#include <thread_abstraction.h>
|
||||
#include <vector>
|
||||
#include <linux/fb.h> /* for screeninfo etc. */
|
||||
|
||||
class GLFramebuffer : public OpenThreads::Thread
|
||||
class GLFramebuffer : public Thread
|
||||
{
|
||||
public:
|
||||
GLFramebuffer(int x, int y);
|
||||
@@ -34,7 +34,7 @@ private:
|
||||
void *pdata; /* not yet used */
|
||||
fb_var_screeninfo si;
|
||||
std::vector<unsigned char> osd_buf; /* silly bounce buffer */
|
||||
void run(); /* for OpenThreads::Thread */
|
||||
void run(); /* for Thread */
|
||||
|
||||
void setup();
|
||||
void blit_osd();
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <OpenThreads/Thread>
|
||||
#include <thread_abstraction.h>
|
||||
|
||||
#include "init_lib.h"
|
||||
#include "lt_debug.h"
|
||||
@@ -69,7 +69,7 @@ static void init_keymap(void)
|
||||
kmap[KEY_F8] = KEY_SLEEP;
|
||||
}
|
||||
|
||||
class Input: public OpenThreads::Thread
|
||||
class Input: public Thread
|
||||
{
|
||||
public:
|
||||
Input();
|
||||
@@ -82,13 +82,13 @@ class Input: public OpenThreads::Thread
|
||||
Input::Input()
|
||||
{
|
||||
Init();
|
||||
start();
|
||||
Thread::start();
|
||||
}
|
||||
|
||||
Input::~Input()
|
||||
{
|
||||
running = false;
|
||||
join();
|
||||
Thread::join();
|
||||
}
|
||||
|
||||
static int dirfilter(const struct dirent *d)
|
||||
|
Reference in New Issue
Block a user