diff options
author | Jerry Zhang <zhangjerry@google.com> | 2018-05-22 01:04:57 +0200 |
---|---|---|
committer | Jerry Zhang <zhangjerry@google.com> | 2018-05-30 00:20:58 +0200 |
commit | b31f9ce6d150a264f584d9b38a54da0723fc249c (patch) | |
tree | 71b88a713e2aa47e6bdbb54748d14f3fa5d29d54 /ui.h | |
parent | ui: Use std::thread to create input/progress threads. (diff) | |
download | android_bootable_recovery-b31f9ce6d150a264f584d9b38a54da0723fc249c.tar android_bootable_recovery-b31f9ce6d150a264f584d9b38a54da0723fc249c.tar.gz android_bootable_recovery-b31f9ce6d150a264f584d9b38a54da0723fc249c.tar.bz2 android_bootable_recovery-b31f9ce6d150a264f584d9b38a54da0723fc249c.tar.lz android_bootable_recovery-b31f9ce6d150a264f584d9b38a54da0723fc249c.tar.xz android_bootable_recovery-b31f9ce6d150a264f584d9b38a54da0723fc249c.tar.zst android_bootable_recovery-b31f9ce6d150a264f584d9b38a54da0723fc249c.zip |
Diffstat (limited to 'ui.h')
-rw-r--r-- | ui.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -18,10 +18,11 @@ #define RECOVERY_UI_H #include <linux/input.h> // KEY_MAX -#include <pthread.h> #include <atomic> +#include <condition_variable> #include <functional> +#include <mutex> #include <string> #include <thread> #include <vector> @@ -188,8 +189,8 @@ class RecoveryUI { bool InitScreensaver(); // Key event input queue - pthread_mutex_t key_queue_mutex; - pthread_cond_t key_queue_cond; + std::mutex key_queue_mutex; + std::condition_variable key_queue_cond; int key_queue[256], key_queue_len; char key_pressed[KEY_MAX + 1]; // under key_queue_mutex int key_last_down; // under key_queue_mutex |