Line data Source code
1 : #pragma once 2 : 3 : #ifndef WIN32 4 : #include <sys/mman.h> // for mode_t 5 : 6 : #endif 7 : 8 : #include "envoy/api/os_sys_calls_common.h" 9 : #include "envoy/common/pure.h" 10 : 11 : namespace Envoy { 12 : namespace Api { 13 : 14 : class HotRestartOsSysCalls { 15 : public: 16 0 : virtual ~HotRestartOsSysCalls() = default; 17 : 18 : /** 19 : * @see shm_open (man 3 shm_open) 20 : */ 21 : virtual SysCallIntResult shmOpen(const char* name, int oflag, mode_t mode) PURE; 22 : 23 : /** 24 : * @see shm_unlink (man 3 shm_unlink) 25 : */ 26 : virtual SysCallIntResult shmUnlink(const char* name) PURE; 27 : }; 28 : 29 : using HotRestartOsSysCallsPtr = std::unique_ptr<HotRestartOsSysCalls>; 30 : 31 : } // namespace Api 32 : } // namespace Envoy