Kernel - Ring buffer free method
authorJohn Hodge <[email protected]>
Sun, 16 Mar 2014 15:07:54 +0000 (23:07 +0800)
committerJohn Hodge <[email protected]>
Sun, 16 Mar 2014 15:07:54 +0000 (23:07 +0800)
KernelLand/Kernel/adt.c
KernelLand/Kernel/include/adt.h

index 9d1a96e..045600a 100644 (file)
@@ -17,6 +17,11 @@ tRingBuffer *RingBuffer_Create(size_t Space)
        return ret;
 }
 
+void RingBuffer_Free(tRingBuffer *Buffer)
+{
+       free(Buffer);
+}
+
 size_t RingBuffer_Read(void *Dest, tRingBuffer *Buffer, size_t Length)
 {
        size_t  tmpLen;
index 67e1266..952a963 100644 (file)
@@ -24,6 +24,12 @@ typedef struct sRingBuffer
  * \return Pointer to the buffer structure
  */
 extern tRingBuffer     *RingBuffer_Create(size_t Space);
+
+/**
+ * \brief Free a ring buffer
+ */
+extern void    RingBuffer_Free(tRingBuffer *Buffer);
+
 /**
  * \brief Read at most \a Length bytes from the buffer
  * \param Dest Destinaton buffer

UCC git Repository :: git.ucc.asn.au