diff options
author | Eric Anholt <[email protected]> | 2017-01-21 16:22:15 +1100 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-08-18 11:56:58 -0700 |
commit | 9caba0f16fc6a1a89effbeb36ec76d58ade58fe1 (patch) | |
tree | 922a0d1eefcc6e16cfc2ede9c281252ce76d1ecf /src/util | |
parent | 57fb1bb5858719b4e91eb350c4f049c25ea8b5a8 (diff) |
anv: Move a comment that got left behind in the u_vector refactor.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/u_vector.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/u_vector.c b/src/util/u_vector.c index 4dc7bc22b69..0de492ccf9a 100644 --- a/src/util/u_vector.c +++ b/src/util/u_vector.c @@ -25,6 +25,15 @@ #include "util/u_math.h" #include "util/u_vector.h" +/** @file u_vector.c + * + * A dynamically growable, circular buffer. Elements are added at head and + * removed from tail. head and tail are free-running uint32_t indices and we + * only compute the modulo with size when accessing the array. This way, + * number of bytes in the queue is always head - tail, even in case of + * wraparound. + */ + int u_vector_init(struct u_vector *vector, uint32_t element_size, uint32_t size) { |