aboutsummaryrefslogtreecommitdiff
path: root/src/keypress_thread.c
diff options
context:
space:
mode:
authorspv <spv@spv.sh>2025-09-24 18:42:02 -0400
committerspv <spv@spv.sh>2025-09-24 18:42:02 -0400
commit7421749f450d9845574a64476a7bebbf8555e8d7 (patch)
treeb6b907daa22c6683f23ebeb1f0c1f3e3407ce4ea /src/keypress_thread.c
parente87085400d4a46793ee4f21ea8591c0f65813ba6 (diff)
refactor, change timeout to 5s
Diffstat (limited to 'src/keypress_thread.c')
-rw-r--r--src/keypress_thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/keypress_thread.c b/src/keypress_thread.c
index a174968..1b102d4 100644
--- a/src/keypress_thread.c
+++ b/src/keypress_thread.c
@@ -15,12 +15,12 @@ void on_press(void) {
// XXX signal light thread
}
-int keypress_thread(pid_t _light_pid) {
+void keypress_thread(pid_t _light_pid) {
light_pid = _light_pid;
FILE* fp = fopen(KEYBOARD_FILE, "r");
fseek(fp, 0, SEEK_END);
-
+
void* discard = malloc(KEYPRESS_SIZE);
while (1) {
@@ -34,5 +34,5 @@ int keypress_thread(pid_t _light_pid) {
// XXX handle SIGINT or whatever
- return 0;
+ __builtin_unreachable();
}