Skip to content

Replace mmap-based IPC with score_baselibs SharedMemoryFactory in ts_client#54

Merged
antonkri merged 8 commits into
eclipse-score:mainfrom
gordon9901:ecarx_pr2_shm_impl
Jun 30, 2026
Merged

Replace mmap-based IPC with score_baselibs SharedMemoryFactory in ts_client#54
antonkri merged 8 commits into
eclipse-score:mainfrom
gordon9901:ecarx_pr2_shm_impl

Conversation

@gordon9901

@gordon9901 gordon9901 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the hand-rolled POSIX shm_open/mmap implementation in ts_client
with score::memory::shared::SharedMemoryFactory from score_baselibs, and
wires up a new SvtHandlerShm timebase handler in TimeDaemon.

ts_client (score/ts_client/)

  • GptpIpcPublisher / GptpIpcReceiver: remove direct shm_open, mmap,
    ftruncate, close calls; use SharedMemoryFactory::Create /
    SharedMemoryFactory::Open instead. Memory region is now constructed via
    ISharedMemoryResource::construct<GptpIpcRegion>().
  • SharedMemoryFactory::Remove + RemoveStaleArtefacts replace the raw
    shm_unlink in publisher init.
  • Header guards updated to drop the redundant _SRC_ segment.

TimeDaemon (score/time_daemon/src/application/svt/)

  • New SvtHandlerShm (factory_shm.h/.cpp, svt_handler_shm.h/.cpp):
    a TimebaseHandler implementation that reads live gPTP data from shared
    memory via GPTPShmMachine and drives the same verification + IPC-publish
    pipeline as the existing SvtHandler.

fixes (#41)

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: a0177da3-250d-455f-8451-eae1acf94377
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 2 packages loaded
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Loading: 2 packages loaded
    currently loading: 
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)
Analyzing: target //:license-check (3 packages loaded, 0 targets configured)

Analyzing: target //:license-check (71 packages loaded, 10 targets configured)

Analyzing: target //:license-check (145 packages loaded, 2747 targets configured)

Analyzing: target //:license-check (154 packages loaded, 5464 targets configured)

Analyzing: target //:license-check (159 packages loaded, 8160 targets configured)

Analyzing: target //:license-check (166 packages loaded, 8211 targets configured)

Analyzing: target //:license-check (166 packages loaded, 8211 targets configured)

Analyzing: target //:license-check (166 packages loaded, 8211 targets configured)

Analyzing: target //:license-check (169 packages loaded, 9477 targets configured)

Analyzing: target //:license-check (170 packages loaded, 10223 targets configured)

INFO: Analyzed target //:license-check (171 packages loaded, 10349 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions, 1 running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 34.294s, Critical Path: 2.83s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

Comment thread score/time_daemon/src/application/svt/svt_handler_shm.cpp Outdated
Comment thread score/ts_client/src/gptp_ipc.h Outdated
Comment thread score/ts_client/src/gptp_ipc_data.h Outdated
Comment thread score/ts_client/src/gptp_ipc_channel.h
Comment thread score/ts_client/src/gptp_ipc_receiver.h Outdated
Comment thread score/ts_client/src/gptp_ipc_publisher.h Outdated
Comment thread score/ts_client/src/gptp_ipc_publisher.h Outdated
Comment thread score/ts_client/src/BUILD Outdated
@antonkri antonkri self-requested a review June 30, 2026 08:11
@antonkri antonkri merged commit eeb878d into eclipse-score:main Jun 30, 2026
11 of 13 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in TIM - Time FT Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants