diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-13 13:29:39 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-13 13:29:39 +0200 |
commit | 879492ae4e15c02beebaaa163a9fd9959807e752 (patch) | |
tree | c7fe0c943dbbbf55bb85fe0cf3b0e4da48024dd1 /src/ring.h | |
parent | Add ring[.ch] (diff) | |
download | coopgammad-879492ae4e15c02beebaaa163a9fd9959807e752.tar.gz coopgammad-879492ae4e15c02beebaaa163a9fd9959807e752.tar.bz2 coopgammad-879492ae4e15c02beebaaa163a9fd9959807e752.tar.xz |
Handle outbound messages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/ring.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -113,3 +113,15 @@ void* ring_peek(struct ring* this, size_t* n); */ void ring_pop(struct ring* this, size_t n); +/** + * Check whether there is more data waiting + * in a ring buffer + * + * @param this The ring buffer + * @return 1 if there is more data, 0 otherwise + */ +static inline int ring_have_more(struct ring* this) +{ + return this->buffer != NULL; +} + |