Implement ECMA-119 burn_source and writer thread handling.

At this time, nglibisofs is able to output an image!! Note that communication
between writer and read thread is done via a pipe. That will be replaced by a
ring buffer in the near future.
This commit is contained in:
Vreixo Formoso
2007-12-22 17:09:28 +01:00
parent 2ab23693db
commit 35ef22cdd7
6 changed files with 97 additions and 16 deletions

View File

@ -13,6 +13,7 @@
#include "util.h"
#include <stdint.h>
#include <pthread.h>
#define BLOCK_SIZE 2048
@ -79,8 +80,12 @@ struct ecma119_image {
IsoRBTree *files;
/* file descriptors for read and writing image */
int wrfd; /* write to here */
int rdfd; /* read from here */
int wrfd; /* write to here */
/* writer thread descriptor */
pthread_t wthread;
pthread_attr_t th_attr;
};
#define BP(a,b) [(b) - (a) + 1]