input now contains function to register any actor to OS events

This commit is contained in:
2025-05-26 17:56:43 -05:00
parent 2edcd89780
commit 2eb6b3e0b4
10 changed files with 193 additions and 179 deletions

View File

@@ -64,6 +64,8 @@ typedef struct WotaBuffer {
size_t capacity; /* allocated capacity in 64-bit words */
} WotaBuffer;
void *wota_dup_data(struct WotaBuffer *wb);
/* Buffer management */
void wota_buffer_init(WotaBuffer *wb, size_t initial_capacity_in_words);
void wota_buffer_free(WotaBuffer *wb);
@@ -118,6 +120,13 @@ static inline uint64_t wota_bswap64(uint64_t x)
#endif
}
void *wota_dup_data(WotaBuffer *wb)
{
void *copy = malloc(wb->size*8);
memcpy(copy, wb->data, wb->size*8);
return copy;
}
/* ================================================================
Helper: Grow the buffer to fit 'min_add' more 64-bit words
================================================================ */