1
0
mirror of https://gittea.dev/nova/th.git synced 2025-10-21 10:20: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;
void *thread_mid(void *data){
void *thread_mid(){
while(!(status & STATUS_QUIT_PROGRAM)){
pthread_mutex_lock(&mutex_mid);
@@ -99,8 +99,7 @@ void *thread_mid(void *data){
}
pthread_exit(0);
}
void *thread_lft(void *data){
unsigned int local_status = *(unsigned int*)data;
void *thread_lft(){
while(!(status & STATUS_QUIT_PROGRAM)){
pthread_mutex_lock(&mutex_lft);
@@ -116,7 +115,7 @@ void *thread_lft(void *data){
path[strrchr(path, '/')-path] = '\0';
path[0] = '/';
if (local_status & STATUS_RELOAD_DIRECTORY) {
if (status & STATUS_RELOAD_DIRECTORY) {
lft_file_count = get_dir_size(path);
free(lft_content);
lft_content = malloc(lft_file_count * sizeof(file));
@@ -132,9 +131,7 @@ void *thread_lft(void *data){
}
void *thread_rgt(void *data){
unsigned int local_status = *(unsigned int*)data;
(void)local_status;
void *thread_rgt(){
file file_current;
while(!(status & STATUS_QUIT_PROGRAM)){
@@ -216,9 +213,7 @@ void *thread_rgt(void *data){
}
pthread_exit(0);
}
void *thread_top(void *data){
unsigned int local_status = *(unsigned int*)data;
(void)local_status;
void *thread_top(){
while(!(status & STATUS_QUIT_PROGRAM)){
pthread_mutex_lock(&mutex_top);
@@ -241,9 +236,7 @@ void *thread_top(void *data){
}
pthread_exit(0);
}
void *thread_btm(void *data){
unsigned int local_status = *(unsigned int*)data;
(void)local_status;
void *thread_btm(){
while(!(status & STATUS_QUIT_PROGRAM)){
pthread_mutex_lock(&mutex_btm);

View File

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