Skip to content

Commit

Permalink
thread/Notify: use FileDescriptor::Write(std::span)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Nov 12, 2024
1 parent c300bab commit 0f0c067
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/thread/Notify.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Notify.hxx"
#include "system/LinuxFD.hxx"
#include "io/UniqueFileDescriptor.hxx"
#include "util/SpanCast.hxx"

Notify::Notify(EventLoop &event_loop, Callback _callback) noexcept
:callback(_callback),
Expand All @@ -25,7 +26,7 @@ Notify::Signal() noexcept
if (!pending.exchange(true)) {
static constexpr uint64_t value = 1;
(void)event.GetFileDescriptor()
.Write(&value, sizeof(value));
.Write(ReferenceAsBytes(value));
}
}

Expand Down

0 comments on commit 0f0c067

Please sign in to comment.