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

          Line data    Source code
       1             : #include "source/common/event/libevent.h"
       2             : 
       3             : #include <csignal>
       4             : 
       5             : #include "source/common/common/assert.h"
       6             : 
       7             : #include "event2/thread.h"
       8             : 
       9             : namespace Envoy {
      10             : namespace Event {
      11             : namespace Libevent {
      12             : 
      13             : bool Global::initialized_ = false;
      14             : 
      15          69 : void Global::initialize() {
      16             : #ifdef WIN32
      17             :   evthread_use_windows_threads();
      18             : #else
      19          69 :   evthread_use_pthreads();
      20             : 
      21             :   // Ignore SIGPIPE and allow errors to propagate through error codes.
      22          69 :   signal(SIGPIPE, SIG_IGN);
      23          69 : #endif
      24          69 :   initialized_ = true;
      25          69 : }
      26             : 
      27             : } // namespace Libevent
      28             : } // namespace Event
      29             : } // namespace Envoy

Generated by: LCOV version 1.15