Fix race condition; header cleanup

pull/2/head
Dave Vasilevsky 14 years ago
parent 1a224d3b80
commit f28ba365fa

@ -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) {

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

@ -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

@ -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

Loading…
Cancel
Save