RetroArch
Classes | Functions
message_queue.c File Reference
#include <stdlib.h>
#include <string.h>
#include <boolean.h>
#include <queues/message_queue.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
Include dependency graph for message_queue.c:

Classes

struct  queue_elem
 
struct  msg_queue
 

Functions

msg_queue_tmsg_queue_new (size_t size)
 
void msg_queue_free (msg_queue_t *queue)
 
void msg_queue_push (msg_queue_t *queue, const char *msg, unsigned prio, unsigned duration)
 
void msg_queue_clear (msg_queue_t *queue)
 
const char * msg_queue_pull (msg_queue_t *queue)
 

Function Documentation

◆ msg_queue_clear()

void msg_queue_clear ( msg_queue_t queue)

msg_queue_clear: : pointer to queue object

Clears out everything in the queue.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msg_queue_free()

void msg_queue_free ( msg_queue_t queue)

msg_queue_free: : pointer to queue object

Frees message queue..

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msg_queue_new()

msg_queue_t* msg_queue_new ( size_t  size)

msg_queue_new: : maximum size of message

Creates a message queue with maximum size different messages.

Returns: NULL if allocation error, pointer to a message queue if successful. Has to be freed manually.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msg_queue_pull()

const char* msg_queue_pull ( msg_queue_t queue)

msg_queue_pull: : pointer to queue object

Pulls highest priority message in queue.

Returns: NULL if no message in queue, otherwise a string containing the message.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msg_queue_push()

void msg_queue_push ( msg_queue_t queue,
const char *  msg,
unsigned  prio,
unsigned  duration 
)

msg_queue_push: : pointer to queue object : message to add to the queue : priority level of the message : how many times the message can be pulled before it vanishes (E.g. show a message for 3 seconds @ 60fps = 180 duration).

Push a new message onto the queue.

Here is the caller graph for this function: