improvenments to threading
This commit is contained in:
@ -71,13 +71,13 @@ void *thread_mid(void *data){
|
||||
mid_content[selected_file_last].status &= ~FILE_STATUS_HOVER;
|
||||
}
|
||||
selected_file_last = selected_file_current;
|
||||
pthread_mutex_unlock(&mutex_selection);
|
||||
|
||||
file_current.file_name = malloc(mid_content[selected_file_current].file_name_width + 1);
|
||||
strcpy(file_current.file_name, mid_content[selected_file_current].file_name);
|
||||
file_current.file_name_width = mid_content[selected_file_current].file_name_width;
|
||||
file_current.file_size_bytes = mid_content[selected_file_current].file_size_bytes;
|
||||
file_current.file_type = mid_content[selected_file_current].file_type;
|
||||
pthread_mutex_unlock(&mutex_selection);
|
||||
|
||||
}
|
||||
free(path);
|
||||
@ -86,9 +86,6 @@ void *thread_mid(void *data){
|
||||
}
|
||||
void *thread_lft(void *data){
|
||||
pthread_mutex_lock(&mutex_lft);
|
||||
/*{{{*/
|
||||
|
||||
|
||||
|
||||
char *path;
|
||||
if((path=getcwd(NULL, 0)) == NULL) {
|
||||
@ -112,7 +109,6 @@ void *thread_lft(void *data){
|
||||
}
|
||||
free(path);
|
||||
pthread_mutex_unlock(&mutex_lft);
|
||||
/*}}}*/
|
||||
pthread_exit(NULL);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user