Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-11-30 14:23:30 +0300
committerFelix Fietkau <nbd@nbd.name>2023-11-30 14:29:40 +0300
commit40acbe34632b8e4e860fe41bb14ab5d7d5c9cfe9 (patch)
tree5f89079b27bc2cc73cd97515eb9f2df2c1385459 /udebug-priv.h
parente84c000c4756ae3d0aa80b2c66ec43cf7fc416c4 (diff)
udebug: wait for response after buffer add/remove
Fixes a race condition where freeing a buffer and immediately re-allocating and adding it would fail to pass the file descriptor to udebugd Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'udebug-priv.h')
-rw-r--r--udebug-priv.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/udebug-priv.h b/udebug-priv.h
index 9e43ddf..96373f9 100644
--- a/udebug-priv.h
+++ b/udebug-priv.h
@@ -25,9 +25,8 @@
#define UDEBUG_TIMEOUT 1000
__hidden int udebug_buf_open(struct udebug_buf *buf, int fd, uint32_t ring_size, uint32_t data_size);
-__hidden struct udebug_client_msg *__udebug_poll(struct udebug *ctx, int *fd, bool wait);
-__hidden void udebug_send_msg(struct udebug *ctx, struct udebug_client_msg *msg,
- struct blob_attr *meta, int fd);
+__hidden struct udebug_client_msg *
+udebug_send_and_wait(struct udebug *ctx, struct udebug_client_msg *msg, int *rfd);
static inline int32_t u32_sub(uint32_t a, uint32_t b)
{