some refractoring

This commit is contained in:
2024-11-25 03:10:28 +01:00
parent 33843688d8
commit f8fd990c67
9 changed files with 370 additions and 343 deletions
+2 -8
View File
@@ -4,24 +4,18 @@
#include <pthread.h>
#include <time.h>
extern boolean_t render_loop(void* args);
extern void *event_loop(void* args);
extern void *cmd_loop(void* args);
boolean_t c_run(void* args)
{
pthread_t event_thread;
pthread_t cmd_thread;
if (pthread_create(&event_thread, NULL, event_loop, args) != 0)
{
perror("Failed to create thread");
}
if (pthread_create(&cmd_thread, NULL, cmd_loop, args) != 0)
{
perror("Failed to create thread");
}
return render_loop(args);
cmd_loop(args);
return FALSE;
}