changed raspi to own thread class

This commit is contained in:
smogm
2015-01-12 20:36:56 +01:00
parent 9ed0a0d244
commit 467f6976f7
4 changed files with 13 additions and 14 deletions

View File

@@ -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()