} \
}
+static int fb_sync_thread_paused;
+
static void *fb_sync_thread(void *arg)
{
int invalid_fb_addr = 1;
sleep(1);
continue;
}
+ if (fb_sync_thread_paused) {
+ ts_add_nsec(ts, 100000000);
+ continue;
+ }
if (wait_ret != ETIMEDOUT) {
clock_gettime(CLOCK_REALTIME, &ts);
}
}
+static void fb_thread_pause(void)
+{
+ fb_sync_thread_paused = 1;
+ // wait until it finishes last refresh
+ // that it might be doing now
+ usleep(10000);
+}
+
+static void fb_thread_resume(void)
+{
+ fb_sync_thread_paused = 0;
+}
+
static u32 xread8(u32 a)
{
iolog("r8 ", a, 0, 8);
static char tmp_path[512];
const char *p2;
char *p;
+ int ret;
if (command == NULL)
return -1;
free((void *)p2);
dbg("system: \"%s\"\n", tmp_path);
- return system(tmp_path);
+
+ // the app might want the screen too..
+ fb_thread_pause();
+ ret = system(tmp_path);
+ fb_thread_resume();
+ return ret;
}