input now contains function to register any actor to OS events
This commit is contained in:
@@ -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
|
||||
================================================================ */
|
||||
|
||||
Reference in New Issue
Block a user