Skip to content

Commit

Permalink
expose buffer pool
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Apr 24, 2024
1 parent fa2f055 commit faa413a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ww/eventloop/event/hloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,10 @@ uint32_t hloop_nactives(hloop_t* loop) {
return loop->nactives;
}

buffer_pool_t* hloop_bufferpool(hloop_t* loop) {
return loop->bufpool;
}

void hloop_set_userdata(hloop_t* loop, void* userdata) {
loop->userdata = userdata;
}
Expand Down
4 changes: 4 additions & 0 deletions ww/eventloop/event/hloop.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ HV_EXPORT uint32_t hloop_nidles(hloop_t* loop);
// @return number of active events
HV_EXPORT uint32_t hloop_nactives(hloop_t* loop);

// @return the loop threadlocal buffer pool
HV_EXPORT buffer_pool_t* hloop_bufferpool(hloop_t* loop);


// userdata
HV_EXPORT void hloop_set_userdata(hloop_t* loop, void* userdata);
HV_EXPORT void* hloop_userdata(hloop_t* loop);
Expand Down

0 comments on commit faa413a

Please sign in to comment.