mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
lightningd/msg_queue: add msg_wake helper.
A cleaner wrapper than a raw io_wake. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
d967c2ba64
commit
a436fa77fc
@@ -15,12 +15,15 @@ struct msg_queue {
|
||||
|
||||
void msg_queue_init(struct msg_queue *q, const tal_t *ctx);
|
||||
|
||||
/* If add is taken(), freed after sending. */
|
||||
/* If add is taken(), freed after sending. msg_wake() implied. */
|
||||
void msg_enqueue(struct msg_queue *q, const u8 *add);
|
||||
|
||||
/* Fd is closed after sending. */
|
||||
/* Fd is closed after sending. msg_wake() implied. */
|
||||
void msg_enqueue_fd(struct msg_queue *q, int fd);
|
||||
|
||||
/* Explicitly wake up a msg_queue_wait */
|
||||
void msg_wake(const struct msg_queue *q);
|
||||
|
||||
/* Returns NULL if nothing to do. */
|
||||
const u8 *msg_dequeue(struct msg_queue *q);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user