Added locked ring buffer implementation which works. Also added in timings so now all that needs doing is to add a lockless algorithm and test the two modes.