Skip to content

Commit

Permalink
Few posix fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks committed Jan 1, 2025
1 parent 3baaf4a commit b9f0912
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/inc/quic_platform_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ CxPlatEventQEnqueue(
)
{
UNREFERENCED_PARAMETER(queue);
return eventfd_write(*sqe, 1) == 0;
return eventfd_write(sqe->fd, 1) == 0;
}

inline
Expand Down Expand Up @@ -1152,6 +1152,7 @@ CxPlatSqeInitialize(
)
{
struct epoll_event event = { .events = EPOLLIN | EPOLLET, .data = { .ptr = sqe } };
sqe->Completion = completion;
if ((sqe->fd = eventfd(0, EFD_CLOEXEC)) == -1) return FALSE;
if (epoll_ctl(*queue, EPOLL_CTL_ADD, sqe->fd, &event) != 0) { close(sqe->fd); return FALSE; }
return TRUE;
Expand Down Expand Up @@ -1221,6 +1222,7 @@ CxPlatEventQEnqueue(
_In_ CXPLAT_SQE* sqe
)
{
// TODO - Should ident simply use the pointer value of sqe?
struct kevent event = {.ident = sqe->Handle, .filter = EVFILT_USER, .flags = EV_ADD | EV_ONESHOT, .fflags = NOTE_TRIGGER, .data = 0, .udata = sqe};
return kevent(*queue, &event, 1, NULL, 0, NULL) == 0;
}
Expand Down

0 comments on commit b9f0912

Please sign in to comment.