Skip to content

Commit 5b7698a

Browse files
authored
Calling isEdge in initialization to set up static variables so later at destruction we do not call xrt::system_linux constructs (#9302)
Signed-off-by: Jason Villarreal <jvillar@xilinx.com>
1 parent d03328f commit 5b7698a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/runtime_src/xdp/profile/database/static_info_database.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ namespace xdp {
5757
#else
5858
pid = static_cast<int>(getpid()) ;
5959
#endif
60+
61+
// During initialization, call the utility function isEdge()
62+
// just to initialize static variables, so later other functions
63+
// will not have to call the xrt::system_linux queries when
64+
// they might have been destroyed
65+
(void)(isEdge());
6066
}
6167

6268
VPStaticDatabase::~VPStaticDatabase()

0 commit comments

Comments
 (0)