Skip to content

Commit

Permalink
Removed use of 'inline'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltyson committed Jan 18, 2012
1 parent 5087d97 commit 274b470
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TPCircularBuffer.c
Expand Up @@ -95,22 +95,22 @@ void TPCircularBufferClear(TPCircularBuffer *buffer) {
buffer->fillCount = 0;
}

inline void* TPCircularBufferTail(TPCircularBuffer *buffer, int32_t* availableBytes) {
void* TPCircularBufferTail(TPCircularBuffer *buffer, int32_t* availableBytes) {
*availableBytes = buffer->fillCount;
return (void*)((char*)buffer->buffer + buffer->tail);
}

inline void TPCircularBufferConsume(TPCircularBuffer *buffer, int32_t amount) {
void TPCircularBufferConsume(TPCircularBuffer *buffer, int32_t amount) {
buffer->tail = (buffer->tail + amount) % buffer->length;
OSAtomicAdd32(-amount, &buffer->fillCount);
}

inline void* TPCircularBufferHead(TPCircularBuffer *buffer, int32_t* availableBytes) {
void* TPCircularBufferHead(TPCircularBuffer *buffer, int32_t* availableBytes) {
*availableBytes = (buffer->length - buffer->fillCount);
return (void*)((char*)buffer->buffer + buffer->head);
}

inline void TPCircularBufferProduce(TPCircularBuffer *buffer, int amount) {
void TPCircularBufferProduce(TPCircularBuffer *buffer, int amount) {
buffer->head = (buffer->head + amount) % buffer->length;
OSAtomicAdd32(amount, &buffer->fillCount);
}
Expand Down

0 comments on commit 274b470

Please sign in to comment.