2
0
mirror of https://github.com/vasi/pixz synced 2024-11-18 15:26:46 +00:00

Fix race condition; header cleanup

This commit is contained in:
Dave Vasilevsky 2010-10-14 04:20:11 -04:00
parent 1a224d3b80
commit f28ba365fa
5 changed files with 3 additions and 7 deletions

View File

@ -375,13 +375,13 @@ void pipeline_create(
// seq and next are garbage // seq and next are garbage
queue_push(gPipelineStartQ, PIPELINE_ITEM, item); queue_push(gPipelineStartQ, PIPELINE_ITEM, item);
} }
if (pthread_create(&gPLSplitThread, NULL, &pipeline_thread_split, NULL))
die("Error creating read thread");
for (size_t i = 0; i < gPLProcessCount; ++i) { for (size_t i = 0; i < gPLProcessCount; ++i) {
if (pthread_create(&gPLProcessThreads[i], NULL, if (pthread_create(&gPLProcessThreads[i], NULL,
&pipeline_thread_process, (void*)(uintptr_t)i)) &pipeline_thread_process, (void*)(uintptr_t)i))
die("Error creating encode thread"); die("Error creating encode thread");
} }
if (pthread_create(&gPLSplitThread, NULL, &pipeline_thread_split, NULL))
die("Error creating read thread");
} }
static void pipeline_qfree(int type, void *p) { static void pipeline_qfree(int type, void *p) {

2
list.c
View File

@ -1,7 +1,5 @@
#include "pixz.h" #include "pixz.h"
#include <getopt.h>
#pragma mark FUNCTION DEFINITIONS #pragma mark FUNCTION DEFINITIONS
void pixz_list(bool tar) { void pixz_list(bool tar) {

1
pixz.c
View File

@ -1,4 +1,5 @@
#include "pixz.h" #include "pixz.h"
#include <unistd.h>
#include <getopt.h> #include <getopt.h>
typedef enum { typedef enum {

2
read.c
View File

@ -3,8 +3,6 @@
#include <archive.h> #include <archive.h>
#include <archive_entry.h> #include <archive_entry.h>
#include <getopt.h>
#pragma mark DECLARE WANTED #pragma mark DECLARE WANTED

View File

@ -3,7 +3,6 @@
#include <archive.h> #include <archive.h>
#include <archive_entry.h> #include <archive_entry.h>
#include <getopt.h>
#pragma mark TYPES #pragma mark TYPES