PebbleOS
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
poll.h File Reference
#include <pbl/kernel/msgq.h>

Data Structures

struct  pbl_poll_group
 Set of message queues waited on together. More...
 

Macros

#define PBL_POLL_GROUP_INITIALIZER   {.members = NULL, .capacity = 0}
 Static initializer for an empty group.
 
#define PBL_POLL_GROUP_DEFINE(name)   struct pbl_poll_group name = PBL_POLL_GROUP_INITIALIZER
 Define an empty group, usable without pbl_poll_group_init().
 

Functions

void pbl_poll_group_init (struct pbl_poll_group *g)
 Initialize a group in dynamically allocated memory.
 
void pbl_poll_group_add (struct pbl_poll_group *g, struct pbl_msgq *q)
 Add a queue to a group.
 
struct pbl_msgq * pbl_poll_group_wait (struct pbl_poll_group *g, pbl_timeout_t timeout)
 Wait until a member queue has a message.
 
bool pbl_poll_group_is_empty (const struct pbl_poll_group *g)
 Check whether every member queue is empty.