LCOV - code coverage report
Current view: top level - source/common/event/posix - signal_impl.cc (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 7 7 100.0 %
Date: 2024-01-05 06:35:25 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include "source/common/event/dispatcher_impl.h"
       2             : #include "source/common/event/signal_impl.h"
       3             : 
       4             : #include "event2/event.h"
       5             : 
       6             : namespace Envoy {
       7             : namespace Event {
       8             : 
       9             : SignalEventImpl::SignalEventImpl(DispatcherImpl& dispatcher, signal_t signal_num, SignalCb cb)
      10         392 :     : cb_(cb) {
      11         392 :   evsignal_assign(
      12         392 :       &raw_event_, &dispatcher.base(), signal_num,
      13         392 :       [](evutil_socket_t, short, void* arg) -> void { static_cast<SignalEventImpl*>(arg)->cb_(); },
      14         392 :       this);
      15         392 :   evsignal_add(&raw_event_, nullptr);
      16         392 : }
      17             : 
      18             : } // namespace Event
      19             : } // namespace Envoy

Generated by: LCOV version 1.15