1
0
mirror of https://gittea.dev/nova/th.git synced 2025-10-21 18:30:15 -04:00

removal of socal_status

This commit is contained in:
nova
2025-08-30 21:01:40 +02:00
parent 5afabfb412
commit 69f9a609e5
2 changed files with 11 additions and 18 deletions

View File

@@ -47,7 +47,7 @@ extern unsigned int terminal_width;
extern unsigned int status; extern unsigned int status;
void *thread_mid(void *data){ void *thread_mid(){
while(!(status & STATUS_QUIT_PROGRAM)){ while(!(status & STATUS_QUIT_PROGRAM)){
pthread_mutex_lock(&mutex_mid); pthread_mutex_lock(&mutex_mid);
@@ -99,8 +99,7 @@ void *thread_mid(void *data){
} }
pthread_exit(0); pthread_exit(0);
} }
void *thread_lft(void *data){ void *thread_lft(){
unsigned int local_status = *(unsigned int*)data;
while(!(status & STATUS_QUIT_PROGRAM)){ while(!(status & STATUS_QUIT_PROGRAM)){
pthread_mutex_lock(&mutex_lft); pthread_mutex_lock(&mutex_lft);
@@ -116,7 +115,7 @@ void *thread_lft(void *data){
path[strrchr(path, '/')-path] = '\0'; path[strrchr(path, '/')-path] = '\0';
path[0] = '/'; path[0] = '/';
if (local_status & STATUS_RELOAD_DIRECTORY) { if (status & STATUS_RELOAD_DIRECTORY) {
lft_file_count = get_dir_size(path); lft_file_count = get_dir_size(path);
free(lft_content); free(lft_content);
lft_content = malloc(lft_file_count * sizeof(file)); lft_content = malloc(lft_file_count * sizeof(file));
@@ -132,9 +131,7 @@ void *thread_lft(void *data){
} }
void *thread_rgt(void *data){ void *thread_rgt(){
unsigned int local_status = *(unsigned int*)data;
(void)local_status;
file file_current; file file_current;
while(!(status & STATUS_QUIT_PROGRAM)){ while(!(status & STATUS_QUIT_PROGRAM)){
@@ -216,9 +213,7 @@ void *thread_rgt(void *data){
} }
pthread_exit(0); pthread_exit(0);
} }
void *thread_top(void *data){ void *thread_top(){
unsigned int local_status = *(unsigned int*)data;
(void)local_status;
while(!(status & STATUS_QUIT_PROGRAM)){ while(!(status & STATUS_QUIT_PROGRAM)){
pthread_mutex_lock(&mutex_top); pthread_mutex_lock(&mutex_top);
@@ -241,9 +236,7 @@ void *thread_top(void *data){
} }
pthread_exit(0); pthread_exit(0);
} }
void *thread_btm(void *data){ void *thread_btm(){
unsigned int local_status = *(unsigned int*)data;
(void)local_status;
while(!(status & STATUS_QUIT_PROGRAM)){ while(!(status & STATUS_QUIT_PROGRAM)){
pthread_mutex_lock(&mutex_btm); pthread_mutex_lock(&mutex_btm);

View File

@@ -5,10 +5,10 @@
#include "threading.c" #include "threading.c"
#endif #endif
void *thread_lft(void *data); void *thread_lft();
void *thread_mid(void *data); void *thread_mid();
void *thread_rgt(void *data); void *thread_rgt();
void *thread_top(void *data); void *thread_top();
void *thread_btm(void *data); void *thread_btm();
void threading_init(); void threading_init();
void threading_free(); void threading_free();