Home | History | Annotate | Download | only in destream

Lines Matching defs:thread

21  * \brief Stream copying thread
30 deStreamCpyThread* thread = (deStreamCpyThread*)arg;
31 deUint8* buffer = malloc(sizeof(deUint8) * (size_t)thread->bufferSize);
39 readResult = deInStream_read(thread->input, buffer, thread->bufferSize, &read);
44 deOutStream_write(thread->output, buffer, read - written, &wrote);
56 deOutStream_flush(thread->output);
62 deStreamCpyThread* thread = malloc(sizeof(deStreamCpyThread));
64 DE_ASSERT(thread);
68 thread->input = input;
69 thread->output = output;
70 thread->bufferSize = bufferSize;
71 thread->thread = deThread_create(cpyStream, thread, DE_NULL);
73 return thread;
76 void deStreamCpyThread_destroy (deStreamCpyThread* thread)
78 deThread_destroy(thread->thread);
80 free(thread);
83 void deStreamCpyThread_join (deStreamCpyThread* thread)
85 deThread_join(thread->thread);