Sturk 1.0.2
Publish-subscribe C implementation.
|
Waiting queue. More...
Go to the source code of this file.
Typedefs | |
typedef struct StWaitq | StWaitq |
Waiting queue. | |
Functions | |
StWaitq * | st_waitq_create (void) |
Create a new waiting queue. | |
void | st_waitq_destroy (StWaitq *waitq) |
Destroy a waiting queue. | |
void | st_waitq_ins (StWaitq *waitq, struct Vertegs *entry) |
Insert an entry into a waiting queue. | |
struct Vertegs * | st_waitq_rem (StWaitq *waitq) |
Remove an entry from the front of the queue. | |
struct Vertegs * | st_waitq_tryrem (StWaitq *waitq) |
Try to remove an entry from the front of the queue. | |
Waiting queue.
StWaitq * st_waitq_create | ( | void | ) |
Create a new waiting queue.
void st_waitq_destroy | ( | StWaitq * | waitq | ) |
Destroy a waiting queue.
[in,out] | waitq | The waiting queue. |
Insert an entry into a waiting queue.
[in,out] | waitq | The waiting queue. |
[in,out] | entry | The inserted entry. |
Remove an entry from the front of the queue.
[in,out] | waitq | The waiting queue. |
This will block the thread if the queue is empty and wake it up only after an entry has been inserted.