|
pianod2
multisource multiuser scriptable networked music player
|
Football message management functions. More...
#include <config.h>#include <stdio.h>#include <errno.h>#include <stdlib.h>#include <assert.h>#include "fb_public.h"#include "fb_service.h"
Functions | |
| void | fb_free_freelists () |
| FB_MESSAGE * | fb_messagealloc (void) |
| void | fb_messagefree (FB_MESSAGE *freethis) |
| FB_MESSAGELIST * | fb_qalloc (void) |
| void | fb_qfree (FB_MESSAGELIST *freethis) |
| bool | fb_queue_empty (FB_IOQUEUE *q) |
| bool | fb_queue_add (FB_IOQUEUE *queue, FB_MESSAGE *message) |
| void | fb_queue_consume (FB_IOQUEUE *q, size_t consume) |
| void | fb_queue_destroy (FB_IOQUEUE *q) |
Variables | |
| static FB_MESSAGE * | freemessages = NULL |
| static FB_MESSAGELIST * | freeq = NULL |
Football message management functions.
| void fb_free_freelists | ( | void | ) |
Free the free message lists

| FB_MESSAGE* fb_messagealloc | ( | void | ) |
Allocate a message block structure. Get it off the free list if its available, otherwise malloc a new one.

| void fb_messagefree | ( | FB_MESSAGE * | freethis | ) |
"Free" a message block by putting it on the free list.

| FB_MESSAGELIST* fb_qalloc | ( | void | ) |

| void fb_qfree | ( | FB_MESSAGELIST * | freethis | ) |
"Free" a single message by putting it on the free list.


| bool fb_queue_add | ( | FB_IOQUEUE * | queue, |
| FB_MESSAGE * | message | ||
| ) |
Add a message to a queue. Does not adjust message block use counts.
| queue | the queue to add to. |
| message | the message to add to the queue. |


| void fb_queue_consume | ( | FB_IOQUEUE * | q, |
| size_t | consume | ||
| ) |
Consume bytes at the front of the queue. Bytes consumed must not exceed the remaining bytes in the front message block.
| q | the queue |
| consume | The number of bytes to consume. |


| void fb_queue_destroy | ( | FB_IOQUEUE * | q | ) |
Trash everything in a queue.
| q | the queue to free. |


| bool fb_queue_empty | ( | FB_IOQUEUE * | q | ) |
Check if a queue empty is empty.

|
static |
|
static |