| Files | Last commit | Last update |
|---|---|---|
refactor(selfdev): split long functions in the shared-memory transport What: - Publisher, subscriber, listener, platform and runtime code: long functions are split into private helpers along their existing steps (socket setup, handshake handling, segment growth, delivery, event dispatch). - Tests, the test peer and the benchmark tool: repeated or long blocks move into small helper functions. - The two OHOS probe programs: main is split into one function per checked step. Why: The size check limits function length, nesting depth and branch count. Behaviour, messages, error codes and the order of checks are unchanged; no copies or allocations were added on the publish and take paths. Verification: - ibmw_selfdev_shm_test: 110 passed, 1 skipped (needs root, as before). - ctest -R shm: 3/3 passed. - The OHOS C programs pass gcc -fsyntax-only. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(selfdev): split long functions in the shared-memory transport What: - Publisher, subscriber, listener, platform and runtime code: long functions are split into private helpers along their existing steps (socket setup, handshake handling, segment growth, delivery, event dispatch). - Tests, the test peer and the benchmark tool: repeated or long blocks move into small helper functions. - The two OHOS probe programs: main is split into one function per checked step. Why: The size check limits function length, nesting depth and branch count. Behaviour, messages, error codes and the order of checks are unchanged; no copies or allocations were added on the publish and take paths. Verification: - ibmw_selfdev_shm_test: 110 passed, 1 skipped (needs root, as before). - ctest -R shm: 3/3 passed. - The OHOS C programs pass gcc -fsyntax-only. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(selfdev): split long functions in the shared-memory transport What: - Publisher, subscriber, listener, platform and runtime code: long functions are split into private helpers along their existing steps (socket setup, handshake handling, segment growth, delivery, event dispatch). - Tests, the test peer and the benchmark tool: repeated or long blocks move into small helper functions. - The two OHOS probe programs: main is split into one function per checked step. Why: The size check limits function length, nesting depth and branch count. Behaviour, messages, error codes and the order of checks are unchanged; no copies or allocations were added on the publish and take paths. Verification: - ibmw_selfdev_shm_test: 110 passed, 1 skipped (needs root, as before). - ctest -R shm: 3/3 passed. - The OHOS C programs pass gcc -fsyntax-only. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(selfdev): replace C memory and formatting calls in selfdev modules What: The crash handler, the shared-memory transport (publisher, subscriber, runtime, platform layer, bench tool and tests) and the concurrent queue test no longer call memcpy, memmove, memset, strcpy, strncpy or snprintf. Copies use std::copy_n (std::copy_backward for the overlapping frame shift in the crash handler), zeroing uses value initialisation or std::fill_n, shared-memory names and hash prefixes are built with a small hex digit helper, and the two publisher log messages use a fixed-size, non-allocating text buffer. In the two C helpers for OpenHarmony, the memset calls became zero initialisers; their remaining snprintf calls already check truncation and their fixed-size memcpy calls copy one int or a short literal, so they stay. Why: The code check reports these C library functions as unsafe. The crash handler and the signal paths still do not allocate, and the shared-memory publish and receive paths keep the same number of copies. Verification: build-ci builds with -Werror; ctest 75/75 (crash handler, shared-memory and queue tests included); both C helpers pass gcc -std=c11 -Wall -Wextra -fsyntax-only. clang-format clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(naming): use camelBack for parameters and local variables What: - Rename function parameters, local variables, local constants, static locals, structured bindings, lambda parameters, lambda init-captures and loop variables from snake_case (and UPPER_CASE local constants) to camelBack in the hand-written C/C++ sources, including function pointer parameter names in the C API structs. - Cover code clang-tidy cannot see: inactive #if branches (newer Fast DDS, OHOS, executor back-ends, test hook builds), files not in the CI build (ROS 2 samples, OHOS-only sources, extension tests, bench and selfdev tools) and locals declared inside function-like macros such as IBMW_PKG_MAIN and IBMW_USE_DRIVER(S). - Where a new name would clash with a name already in scope, pick a distinct name: the sample hello_msg.h constructor uses msgId/msg/ts, the shm transport driver's structured bindings are re-captured by name for the older OHOS clang, and one generic DDS type branch reuses the name the other branch already declares. - Update comments that name the parameters (/*name=*/ argument comments, @param, \p and inline prose). - Re-run clang-format on every changed file. - Members, types, enum values, globals, namespace constants, functions, macros, macro parameters and third-party code are unchanged. Why: the daily code check requires camelBack names for parameters and local variables. Verification: clang-tidy readability-identifier-naming for parameters and locals reports 0 findings in repo files; g++ -Wshadow over all build-ci sources shows no new warnings (two fewer); syntax checks of the core metrics/comm trace/test hook and fault/reporter build variants show no new errors; full build-ci build has no errors; ctest 75/75; mw_perf_collect pytest 968 passed, 2 skipped; core metrics pytest 215 passed; clang-format --dry-run -Werror clean on all C/C++ files; license header check 0 changes. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
perf(shm): keep the publish fast path in one function What: mark StampPublishLocked and DeliverToAllLocked, the two helpers split out of PublisherImpl::Publish, as always inline. Why: after the split the compiler kept both helpers out of line, so every publish made two extra calls. On the OHOS board pod_loan_publish was 4 to 6 ns slower than master in every round. Verification: disassembly shows Publish as one function again with no calls to the helpers; board run (11 interleaved rounds, all clean) pod_loan_publish 64B -2.9 ns, 4096B -1.1 ns against master; host build passes, ctest 75/75, clang-format clean, function size check 0. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(selfdev): split long functions in the shared-memory transport What: - Publisher, subscriber, listener, platform and runtime code: long functions are split into private helpers along their existing steps (socket setup, handshake handling, segment growth, delivery, event dispatch). - Tests, the test peer and the benchmark tool: repeated or long blocks move into small helper functions. - The two OHOS probe programs: main is split into one function per checked step. Why: The size check limits function length, nesting depth and branch count. Behaviour, messages, error codes and the order of checks are unchanged; no copies or allocations were added on the publish and take paths. Verification: - ibmw_selfdev_shm_test: 110 passed, 1 skipped (needs root, as before). - ctest -R shm: 3/3 passed. - The OHOS C programs pass gcc -fsyntax-only. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(selfdev): split long functions in the shared-memory transport What: - Publisher, subscriber, listener, platform and runtime code: long functions are split into private helpers along their existing steps (socket setup, handshake handling, segment growth, delivery, event dispatch). - Tests, the test peer and the benchmark tool: repeated or long blocks move into small helper functions. - The two OHOS probe programs: main is split into one function per checked step. Why: The size check limits function length, nesting depth and branch count. Behaviour, messages, error codes and the order of checks are unchanged; no copies or allocations were added on the publish and take paths. Verification: - ibmw_selfdev_shm_test: 110 passed, 1 skipped (needs root, as before). - ctest -R shm: 3/3 passed. - The OHOS C programs pass gcc -fsyntax-only. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(selfdev): split long functions in the shared-memory transport What: - Publisher, subscriber, listener, platform and runtime code: long functions are split into private helpers along their existing steps (socket setup, handshake handling, segment growth, delivery, event dispatch). - Tests, the test peer and the benchmark tool: repeated or long blocks move into small helper functions. - The two OHOS probe programs: main is split into one function per checked step. Why: The size check limits function length, nesting depth and branch count. Behaviour, messages, error codes and the order of checks are unchanged; no copies or allocations were added on the publish and take paths. Verification: - ibmw_selfdev_shm_test: 110 passed, 1 skipped (needs root, as before). - ctest -R shm: 3/3 passed. - The OHOS C programs pass gcc -fsyntax-only. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago |