| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
refactor(selfdev): split the bounded blocking queue header and long tests What: - bounded_blocking_queue.h keeps the class with its public API, types, constants and small members. The out-of-class definitions of the producer side, the consumer side, and waiting and waking move into three new headers under detail/, which the main header includes at its end, so users still include only bounded_blocking_queue.h. - Wait() is split into its spin and sleep phases, and TakeHeld() into two waiting helpers. The new helpers are always_inline; the moved definitions stay inline, and noinline is kept where it was. - Long tests of the queue and the hash map move thread bodies and repeated blocks into helper functions. Why: The size check limits a header to 500 code lines and limits function length, nesting depth and branch count. Behaviour, the memory orders and the order of all operations are unchanged. A queue benchmark built against the old and the new header gave the same results within the noise of the machine. Verification: - ctest -R selfdev_concurrent: 6/6 passed. - queue_bench builds against the new header. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 天前 | |
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 天前 | |
refactor(selfdev): split the bounded blocking queue header and long tests What: - bounded_blocking_queue.h keeps the class with its public API, types, constants and small members. The out-of-class definitions of the producer side, the consumer side, and waiting and waking move into three new headers under detail/, which the main header includes at its end, so users still include only bounded_blocking_queue.h. - Wait() is split into its spin and sleep phases, and TakeHeld() into two waiting helpers. The new helpers are always_inline; the moved definitions stay inline, and noinline is kept where it was. - Long tests of the queue and the hash map move thread bodies and repeated blocks into helper functions. Why: The size check limits a header to 500 code lines and limits function length, nesting depth and branch count. Behaviour, the memory orders and the order of all operations are unchanged. A queue benchmark built against the old and the new header gave the same results within the noise of the machine. Verification: - ctest -R selfdev_concurrent: 6/6 passed. - queue_bench builds against the new header. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 天前 | |
fix(tests): close the zenoh peer config and undo small review findings What: - zenoh bus, RPC driver and transport driver tests close the peer.json5 stream before the bus reads it. - The iceoryx subscription stop helper and the publisher options helper are no longer noexcept, like the lambdas they replaced. - The release symbol checks also match the renamed fault hook variable. - The bounded queue starvation message says "items late" again. - The generated ROS 2 RPC client comment now gives the real reason ctx_ptr is kept: existing user code regions refer to it. Why: The peer config was written through a named stream that was still open, so the bus could read an empty file and use multicast discovery instead. The other changes undo small behaviour and text changes from the layout and rename work. Verification: build-ci builds without errors, ctest 75/75, ibmw_gen tests pass apart from the known installed-SDK case, clang-format and generated-code format checks clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 天前 | |
refactor(naming): use the .cpp suffix for C++ source files What: rename every C++ source file in the repository from .cc to .cpp (824 files, with git history kept as renames) and update the build lists, scripts, tests, configs, docs and source comments that name them. The project generators (ibmw-gen and ibmw_cli) now write .cpp files for new projects; when a project being regenerated already holds .cc sources from an earlier run, the generators keep .cc for it so the user's files and CMake lists stay consistent. A small helper picks the suffix from the output directory, and new tests cover both the new and the legacy case. Generated CMake lists from ibmw_cli accept both suffixes. The in-tree generated samples and the template project are regenerated with the new names. Why: the code check requires C++ source files to use the .cpp suffix. Verification: full build with 0 errors; ctest 75/75 passed; ibmw-gen tests 341 passed with only the known environment-dependent failure; mw_perf_collect tests 968 passed, 2 skipped; core metrics tests 215 passed; shell tests show only the three known environment failures; clang-format, generated-code format, license header, docs governance and release hygiene checks pass. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 天前 | |
refactor(selfdev): split the bounded blocking queue header and long tests What: - bounded_blocking_queue.h keeps the class with its public API, types, constants and small members. The out-of-class definitions of the producer side, the consumer side, and waiting and waking move into three new headers under detail/, which the main header includes at its end, so users still include only bounded_blocking_queue.h. - Wait() is split into its spin and sleep phases, and TakeHeld() into two waiting helpers. The new helpers are always_inline; the moved definitions stay inline, and noinline is kept where it was. - Long tests of the queue and the hash map move thread bodies and repeated blocks into helper functions. Why: The size check limits a header to 500 code lines and limits function length, nesting depth and branch count. Behaviour, the memory orders and the order of all operations are unchanged. A queue benchmark built against the old and the new header gave the same results within the noise of the machine. Verification: - ctest -R selfdev_concurrent: 6/6 passed. - queue_bench builds against the new header. - clang-format --dry-run -Werror on the changed files is clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 天前 |