RIOT-OS/RIOT — pull request #1101 by Kijewski (2014-05-03 18:25:33+00:00)
Title: ringbuffer: versatility and optimizations

This is my second take on #933, to make the ringbuffer more versatile.

* This PR is rebased on #1099.
* It removes clutter from the code (but might need unit tests).
* It adds peek functionality, and helper functions to test if the ringbuffer is full/empty.
* It optimizes the parameter usage (`unsigned` types for lengths, `restricted`).
* It make the implementation easier to understand by dropping the explicit pointer to the end of the buffer. This also strips `sizeof (void *)` bytes per ringbuffer.
* `ringbuffer_add()` won't overwrite existing content. `ringbuffer_get_one()` will tell what was overwritten.
* It adds the missing documentation for the library.

Please see the individual commits.