diff src/recpt1.c @ 125:e413158cae13

Add ushare project files.
author naoyan@johnstown.minaminoshima.org
date Sun, 03 Oct 2010 11:35:19 +0900
parents 9c7bc6c0327e
children 5dcaf3785ebe
line wrap: on
line diff
--- a/src/recpt1.c	Wed Sep 29 23:18:55 2010 +0900
+++ b/src/recpt1.c	Sun Oct 03 11:35:19 2010 +0900
@@ -204,6 +204,18 @@
     free(p_queue);
 }
 
+void
+destroy_stream_queue(STREAM_QUEUE_T *p_queue)
+{
+    if(!p_queue)
+        return;
+
+    pthread_mutex_destroy(&p_queue->mutex);
+    pthread_cond_destroy(&p_queue->cond_avail);
+    pthread_cond_destroy(&p_queue->cond_used);
+    free(p_queue);
+}
+
 /* enqueue data. this function will block if queue is full. */
 void
 enqueue(QUEUE_T *p_queue, BUFSZ *data)