Skip to content

Commit 201ac42

Browse files
authored
Create IPC abstractions IpcMessage and IpcChat and use them in the Profiler (#8703)
* Add IpcMessage classes. * Add IpcChat classes. * Use the new IPC classes in ProfilerManager. * Fix MacOS build. * Fix Android build. * Add IpcNamedSignal. * Add IpcSharedSignal. * Rework IPC mechanism. * Improve IpcMessageTest. * Adjustments. * Use final classes.
1 parent 382cf0f commit 201ac42

25 files changed

+2068
-584
lines changed

builds/posix/make.android.arm64

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ LIB_PLATFORM_RPATH=-Wl,-rpath,\$$ORIGIN
3333
LibraryFullName=$(LibraryBaseName)
3434
LibrarySoName=$(LibraryBaseName)
3535

36+
# Global c++ flags: firebird needs no RTTI, choose build standard and c++ specific warnings level
37+
PLUSPLUS_FLAGS:= -fno-rtti -std=c++20 -Werror=delete-incomplete -Werror=return-type
38+
3639
COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DARM64 -pipe -MMD -fPIC -fmessage-length=0 \
3740
-I$(ROOT)/extern/libtommath -I$(ROOT)/extern/libtomcrypt/src/headers \
3841
$(CROSS_FLAGS) -fsigned-char \

builds/posix/make.android.arme

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ LIB_PLATFORM_RPATH=-Wl,-rpath,\$$ORIGIN
3333
LibraryFullName=$(LibraryBaseName)
3434
LibrarySoName=$(LibraryBaseName)
3535

36+
# Global c++ flags: firebird needs no RTTI, choose build standard and c++ specific warnings level
37+
PLUSPLUS_FLAGS:= -fno-rtti -std=c++20 -Werror=delete-incomplete -Werror=return-type
38+
3639
COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DARM -pipe -MMD -fPIC -fmessage-length=0 \
3740
-I$(ROOT)/extern/libtommath -I$(ROOT)/extern/libtomcrypt/src/headers \
3841
$(CROSS_FLAGS) -fsigned-char \

builds/posix/make.android.x86

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ LIB_PLATFORM_RPATH=-Wl,-rpath,\$$ORIGIN
3333
LibraryFullName=$(LibraryBaseName)
3434
LibrarySoName=$(LibraryBaseName)
3535

36+
# Global c++ flags: firebird needs no RTTI, choose build standard and c++ specific warnings level
37+
PLUSPLUS_FLAGS:= -fno-rtti -std=c++20 -Werror=delete-incomplete -Werror=return-type
38+
3639
COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -pipe -MMD -fPIC -fmessage-length=0 \
3740
-I$(ROOT)/extern/libtommath -I$(ROOT)/extern/libtomcrypt/src/headers \
3841
$(CROSS_FLAGS) \

builds/posix/make.android.x86_64

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ LIB_PLATFORM_RPATH=-Wl,-rpath,\$$ORIGIN
3333
LibraryFullName=$(LibraryBaseName)
3434
LibrarySoName=$(LibraryBaseName)
3535

36+
# Global c++ flags: firebird needs no RTTI, choose build standard and c++ specific warnings level
37+
PLUSPLUS_FLAGS:= -fno-rtti -std=c++20 -Werror=delete-incomplete -Werror=return-type
38+
3639
COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DAMD64 -pipe -MMD -fPIC -fmessage-length=0 \
3740
-I$(ROOT)/extern/libtommath -I$(ROOT)/extern/libtomcrypt/src/headers \
3841
$(CROSS_FLAGS) \

builds/posix/make.shared.variables

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ AllObjects += $(Common_Objects)
3939
# Common test files
4040
COT1:= $(call dirObjects,common/tests)
4141
COT2:= $(call dirObjects,common/classes/tests)
42-
Common_Test_Objects:= $(COT1) $(COT2) $(call makeObjects,yvalve,gds.cpp)
42+
COT3:= $(call dirObjects,common/ipc/tests)
43+
Common_Test_Objects:= $(COT1) $(COT2) $(COT3) $(call makeObjects,yvalve,gds.cpp)
4344

4445
AllObjects += $(Common_Test_Objects)
4546

builds/win32/msvc15/common.vcxproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@
197197
<ClInclude Include="..\..\..\src\common\intlobj_new.h" />
198198
<ClInclude Include="..\..\..\src\common\IntlParametersBlock.h" />
199199
<ClInclude Include="..\..\..\src\common\IntlUtil.h" />
200+
<ClInclude Include="..\..\..\src\common\ipc\IpcChat.h" />
201+
<ClInclude Include="..\..\..\src\common\ipc\IpcMessage.h" />
202+
<ClInclude Include="..\..\..\src\common\ipc\IpcNamedSignal.h" />
200203
<ClInclude Include="..\..\..\src\common\isc_f_proto.h" />
201204
<ClInclude Include="..\..\..\src\common\isc_proto.h" />
202205
<ClInclude Include="..\..\..\src\common\isc_s_proto.h" />
@@ -423,4 +426,4 @@
423426
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
424427
<ImportGroup Label="ExtensionTargets">
425428
</ImportGroup>
426-
</Project>
429+
</Project>

builds/win32/msvc15/common.vcxproj.filters

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,5 +626,14 @@
626626
<ClInclude Include="..\..\..\src\include\fb_exception.h">
627627
<Filter>headers</Filter>
628628
</ClInclude>
629+
<ClInclude Include="..\..\..\src\common\ipc\IpcChat.h">
630+
<Filter>headers</Filter>
631+
</ClInclude>
632+
<ClInclude Include="..\..\..\src\common\ipc\IpcMessage.h">
633+
<Filter>headers</Filter>
634+
</ClInclude>
635+
<ClInclude Include="..\..\..\src\common\ipc\IpcNamedSignal.h">
636+
<Filter>headers</Filter>
637+
</ClInclude>
629638
</ItemGroup>
630-
</Project>
639+
</Project>

builds/win32/msvc15/common_test.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@
249249
</ResourceCompile>
250250
</ItemGroup>
251251
<ItemGroup>
252+
<ClCompile Include="..\..\..\src\common\ipc\tests\IpcChatTest.cpp" />
253+
<ClCompile Include="..\..\..\src\common\ipc\tests\IpcMessageTest.cpp" />
252254
<ClCompile Include="..\..\..\src\common\tests\CommonTest.cpp" />
253255
<ClCompile Include="..\..\..\src\common\tests\CvtTest.cpp" />
254256
<ClCompile Include="..\..\..\src\common\tests\StringTest.cpp" />

builds/win32/msvc15/common_test.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,11 @@
4848
<ClCompile Include="..\..\..\src\yvalve\gds.cpp">
4949
<Filter>source</Filter>
5050
</ClCompile>
51+
<ClCompile Include="..\..\..\src\common\ipc\tests\IpcChatTest.cpp">
52+
<Filter>source</Filter>
53+
</ClCompile>
54+
<ClCompile Include="..\..\..\src\common\ipc\tests\IpcMessageTest.cpp">
55+
<Filter>source</Filter>
56+
</ClCompile>
5157
</ItemGroup>
5258
</Project>

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,7 @@ dnl Checks for pthread functions
11751175
AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
11761176
AC_CHECK_FUNCS(pthread_mutexattr_setrobust)
11771177
AC_CHECK_FUNCS(pthread_mutex_consistent)
1178+
AC_CHECK_FUNCS(pthread_mutex_timedlock)
11781179
AC_CHECK_FUNCS(pthread_rwlockattr_setkind)
11791180
AC_CHECK_FUNCS(pthread_cancel)
11801181
AC_CHECK_FUNCS(pthread_atfork)

0 commit comments

Comments
 (0)