diff options
author | David Robillard <d@drobilla.net> | 2011-09-18 18:53:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-09-18 18:53:59 +0000 |
commit | 6651d4dbf74dc4591fbaf5250bfd6f7d58ce0363 (patch) | |
tree | 04d1a6666c5d79aa9b2129392397b884a98049e4 /src | |
parent | 4d2da91a500ce75f61fdf1f5d03abde795fb7770 (diff) | |
download | zix-6651d4dbf74dc4591fbaf5250bfd6f7d58ce0363.tar.gz zix-6651d4dbf74dc4591fbaf5250bfd6f7d58ce0363.tar.bz2 zix-6651d4dbf74dc4591fbaf5250bfd6f7d58ce0363.zip |
Tidy.
git-svn-id: http://svn.drobilla.net/zix/trunk@14 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'src')
-rw-r--r-- | src/ring.c | 4 | ||||
-rw-r--r-- | src/sorted_array.c | 8 | ||||
-rw-r--r-- | src/tree.c | 6 |
3 files changed, 11 insertions, 7 deletions
@@ -23,8 +23,6 @@ # include <sys/mman.h> #endif -#include "zix/ring.h" - #if defined(__APPLE__) # include <libkern/OSAtomic.h> # define ZIX_FULL_BARRIER() OSMemoryBarrier() @@ -39,6 +37,8 @@ #define ZIX_READ_BARRIER() ZIX_FULL_BARRIER() #define ZIX_WRITE_BARRIER() ZIX_FULL_BARRIER() +#include "zix/ring.h" + struct ZixRingImpl { uint32_t write_head; ///< Read index into buf uint32_t read_head; ///< Write index into buf diff --git a/src/sorted_array.c b/src/sorted_array.c index e41797d..e841380 100644 --- a/src/sorted_array.c +++ b/src/sorted_array.c @@ -81,7 +81,9 @@ zix_sorted_array_size(ZixSortedArray* a) ZIX_API ZixStatus -zix_sorted_array_insert(ZixSortedArray* a, const void* e, ZixSortedArrayIter* ai) +zix_sorted_array_insert(ZixSortedArray* a, + const void* e, + ZixSortedArrayIter* ai) { if (a->num_elems == 0) { assert(!a->array); @@ -140,7 +142,9 @@ zix_sorted_array_index(const ZixSortedArray* a, size_t index) ZIX_API ZixStatus -zix_sorted_array_find(const ZixSortedArray* a, const void* e, ZixSortedArrayIter* ai) +zix_sorted_array_find(const ZixSortedArray* a, + const void* e, + ZixSortedArrayIter* ai) { if (a->num_elems == 0) { *ai = NULL; @@ -554,9 +554,9 @@ ZixStatus zix_tree_remove(ZixTree* t, ZixTreeIter ti) { ZixTreeNode* const n = ti; - ZixTreeNode** pp = NULL; // parent pointer - ZixTreeNode* to_balance = n->parent; // lowest node to start rebalace at - int8_t d_balance = 0; // delta(balance) for n->parent + ZixTreeNode** pp = NULL; // parent pointer + ZixTreeNode* to_balance = n->parent; // lowest node to balance + int8_t d_balance = 0; // delta(balance) for n->parent #ifdef ZIX_TREE_DUMP printf("*** REMOVE %ld\n", (intptr_t)n->data); |