summaryrefslogtreecommitdiffstats
path: root/ipc/ipdl/ipdl.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /ipc/ipdl/ipdl.py
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/ipdl/ipdl.py')
-rw-r--r--ipc/ipdl/ipdl.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/ipc/ipdl/ipdl.py b/ipc/ipdl/ipdl.py
index 230e0a213f..befaacca45 100644
--- a/ipc/ipdl/ipdl.py
+++ b/ipc/ipdl/ipdl.py
@@ -8,6 +8,7 @@ from configparser import RawConfigParser
from io import StringIO
import ipdl
+from ipdl.ast import SYNC
def log(minv, fmt, *args):
@@ -96,6 +97,7 @@ log(2, 'Generated C++ headers will be generated relative to "%s"', headersdir)
log(2, 'Generated C++ sources will be generated in "%s"', cppdir)
allmessages = {}
+allsyncmessages = []
allmessageprognames = []
allprotocols = []
@@ -172,10 +174,16 @@ for f in files:
if ast.protocol:
allmessages[ast.protocol.name] = ipdl.genmsgenum(ast)
allprotocols.append(ast.protocol.name)
+
# e.g. PContent::RequestMemoryReport (not prefixed or suffixed.)
for md in ast.protocol.messageDecls:
allmessageprognames.append("%s::%s" % (md.namespace, md.decl.progname))
+ if md.sendSemantics is SYNC:
+ allsyncmessages.append(
+ "%s__%s" % (ast.protocol.name, md.prettyMsgName())
+ )
+
allprotocols.sort()
# Check if we have undefined message names in segmentCapacityDict.
@@ -248,6 +256,23 @@ print(
namespace IPC {
+bool IPCMessageTypeIsSync(uint32_t aMessageType)
+{
+ switch (aMessageType) {
+""",
+ file=ipc_msgtype_name,
+)
+
+for msg in allsyncmessages:
+ print(" case %s:" % msg, file=ipc_msgtype_name)
+
+print(
+ """ return true;
+ default:
+ return false;
+ }
+}
+
const char* StringFromIPCMessageType(uint32_t aMessageType)
{
switch (aMessageType) {