-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated support for Green Hills INTEGRITY and INTEGRITY-178 RTOS #2340
base: master
Are you sure you want to change the base?
Conversation
Includes INTEGRITY RTOS and INTEGRITY-178 tuMP
- Make INTEGRITY's config file conditional on whether POSIX calls are available
WalkthroughThe changes span multiple subsystems. The updates include additions to the Changes
Sequence Diagram(s)sequenceDiagram
participant Factory as TAO Resource Factory
participant Reactor as ACE_Single_Input_Reactor
participant ACE_Reactor as ACE_Reactor Singleton
Factory->>Reactor: Request allocation (TAO_REACTOR_SINGLE_INPUT)
Reactor-->>Factory: Reactor instance created
Reactor->>ACE_Reactor: Set as current reactor instance
ACE_Reactor-->>Factory: Reactor registered and active
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (28)
ACE/ace/OS_NS_arpa_inet.cpp (1)
102-118
: Added INTEGRITY-specific implementation of inet_ntoaThe implementation correctly converts an IPv4 address from network representation to a string. This implementation is needed to support systems where the standard function is missing.
Consider removing the commented-out debug printf statement on line 109 as it's not providing value in production code.
- // printf("Socket address %X, IP address %X.\n",addr.s_addr,ipaddr);
Also, be aware that this implementation uses a static buffer which could cause issues in multi-threaded environments. If INTEGRITY uses this in multi-threaded contexts, consider using thread-local storage or requiring callers to provide their own buffer.
ACE/ace/OS_NS_sys_socket.inl (1)
949-949
: Minor cleanup of preprocessor directive.The removal of a comment from the
#endif
directive makes the code cleaner and more consistent with other preprocessor directives in the file.ACE/ace/OS_NS_arpa_inet.inl (1)
12-45
: Check range bounds in custom inet_addr implementation.The loop correctly parses up to four IP segments, but does not verify that each segment ≤ 255. Larger values (e.g., 999) will be silently included in the final address, leading to incorrect IP resolution. Consider adding a validation step:
while (*name >= '0' && *name <= '9') { segment *= 10; segment += *name++ - '0'; + if (segment > 255) { + valid = 0; + break; + } }ACE/ace/config-integrity.h (1)
62-62
: Consider a more robust fileno implementation.The fileno macro implementation is a hack (as noted in the comment) to get Svc_Conf_l.cpp compiled. While this works, consider a more robust solution for file descriptor handling in the future to reduce technical debt.
ACE/ace/Flag_Manip.cpp (3)
24-57
: Encapsulated flag manipulation logic looks clean.
The introduction ofset_flags_helper()
andclr_flags_helper()
in an unnamed namespace is a neat way to centralize and streamline flag updates. It improves maintainability by eliminating repeatedfcntl
calls throughout the code. However, consider adding minimal debug logging or error handling to provide actionable diagnostics for failure cases (e.g., whenfcntl
returns-1
), especially in production builds.
80-106
: Nested preprocessor conditions may reduce readability.
Although this block correctly handles multiple edge cases (e.g.,ACE_LACKS_IOCTL
vs. fallback toioctl
), the nested#if
andswitch
statements can become hard to follow as the codebase grows. Consider refactoring or documenting the logic more clearly, possibly by extracting platform-specific code into separate functions.
130-157
: Ensure robust error handling for I/O calls.
Like the set-flags case, theclr_flags
logic is heavily guarded by#if
directives. The approach is valid, but ifposix_devctl
orioctl
fail, the code returns the result without further commentary. You might consider logging or capturingerrno
to facilitate debugging in production or test environments.ACE/ace/config-integrity178.h (1)
117-123
: Thread-specific storage emulation.
DefiningACE_HAS_TSS_EMULATION
for INTEGRITY-178B is appropriate given the lack of direct TSS APIs. Keep in mind that TSS emulation may introduce additional overhead. If performance becomes a concern, investigate alternative concurrency patterns or OS-level hooks if Green Hills provides them for the 178B environment.ACE/ace/config-integritySCA.h (2)
25-34
: Commented-out macros for user/group operations.
Leaving these macros commented out (e.g.,ACE_LACKS_SETEGID
,ACE_LACKS_SETEUID
) might cause confusion unless documented. Clarify whether developers should uncomment them if an older integrity environment truly lacks these features, or remove them entirely to avoid stale code.
92-101
: Wide character function omissions.
Macros likeACE_LACKS_WCSICMP
,ACE_LACKS_WCSNICMP
, andACE_LACKS_WCSDUP
are common in embedded or specialized RTOS setups. If applications require wide-char functionality, consider providing stubs or alternative implementations to gracefully handle references to these functions.ACE/ace/OS_NS_Thread.h (2)
43-48
: Remove unused<map>
include.
It appears<map>
is no longer needed since you've opted for a static array implementation for TSS. Removing it can reduce clutter and potential confusion.# if defined (INTEGRITY) # include "ace/Log_Msg.h" -# include <map> # endif
290-367
: Minor comment grammatical fix & future expansion.
- Update the comment “already insert this entry” to “already inserted this entry.”
- If you need to support more than
ACE_DEFAULT_THREADS
tasks or a dynamic approach, consider using ACE’s map or a custom structure and remove the TODO in the comments.Proposed comment fix:
- // Earlier call has already insert this entry. + // An earlier call has already inserted this entry.ACE/ace/OS_NS_Thread.cpp (2)
1567-1573
: INTEGRITY-specific branch for cond_timedwait.
Currently returnsACE_NOTSUP_RETURN(-1)
, indicating no implementation. If you plan to support timed waits later, consider providing at least partial functionality.If you need help implementing a partial emulation using available INTEGRITY calls, let us know.
3300-3442
: New INTEGRITY namespace block for TSS workaround.
This sizable insertion for INTEGRITY/INTEGRITY-178B manages TSS via a global map and custom adapters. The strategy looks reasonable, but be sure to stress-test concurrency scenarios and memory usage.Consider adding unit tests specifically covering corner cases such as repeated TSS sets and cross-thread resource cleanup.
ACE/ace/OS_NS_Thread.inl (8)
1445-1450
: Consolidate 'not supported' code.Under INTEGRITY, returning
ACE_NOTSUP_RETURN(-1)
forsema_destroy()
is reasonable for now. If full semaphore cleanup becomes a requirement, consider implementing or simulating the missing operation rather than leaving it permanently unsupported.
2067-2082
: Implement wait with concurrency safety.Here, the code for INTEGRITY178B manually checks for underflow and returns
-1
if the semaphore is at its limit. Please verify that race conditions where multiple tasks attempt to wait simultaneously are accounted for, and consider whether further synchronization or error handling is needed.
2281-2286
: Timeout-based semaphore wait not supported.Returning
ACE_NOTSUP_RETURN(-1)
indicates no timeout support for INTEGRITY insema_wait()
. If the design requires timed waits in the future, plan to integrate the appropriate OS-level calls or a custom workaround.
2401-2403
: Check for partial SIG support.This code for
sigwait()
on INTEGRITY is stubbed out withACE_NOTSUP_RETURN(-1)
. If signals are necessary, consider emulating the behavior or gracefully ignoring them to avoid unexpected runtime issues.
2755-2757
: Confirm thr_kill equivalence.Using
::ExitTask(thr_id, (Value)signum)
to emulatethr_kill
is effectively forcing thread termination. Confirm that forced exit fits your cleanup model and doesn’t bypass destructors or resource deallocation, especially if signals were originally used for graceful interruption.
3210-3211
: Assess yield correctness.Replacing
thr_yield()
with::Yield()
can change scheduling behavior. Confirm that this implementation meets your fairness or real-time requirements, as some OS-level yields may be no-ops or exhibit unexpected side effects.
3266-3270
: Thread mutex init stub.The code ignores attributes such as
lock_type
,name
, or extended parameters. If external components rely on specialized mutex attributes, consider implementing them for more fine-grained synchronization control.
3312-3316
: Add extended mutex attribute support if needed.Similar to the previous stub, this code discards the lock attributes. If advanced concurrency or debugging features become essential, revisit this area for a more comprehensive initialization approach.
ACE/ace/Single_Input_Reactor.cpp (4)
12-16
: Prefer explicit boolean.
initialized()
returns1
, although the return type is effectively boolean. Consider returningtrue
to avoid confusion and to make the intent clearer.
17-20
: Clarify meaning of size.
size()
returns1
if an event handler is set, otherwise0
. For readability, consider returning a strictly unsigned integer (0 or 1), or rename the method to reflect that it indicates presence or absence of a handler. If future expansions allow more handlers, refactor accordingly.
37-44
: Check error indications from handle_input.When invoking
handler->handle_input()
, the return code can signal closure or errors. Evaluate whether you need to handle such indications (e.g., removing the handler if it requests shutdown).
46-50
: Assess concurrency with Null_Mutex.Returning a lock adapter around
ACE_Null_Mutex
means no real synchronization. Confirm that no parallel threads will concurrently call methods that could interfere with each other or disrupt reactor state.ACE/ace/Single_Input_Reactor.h (2)
1-12
: Expand documentation on limitations.The top comment clarifies the single-input nature but may not fully describe other constraints like lack of notification or timeout handling. Document these limitations thoroughly so that users don’t accidentally rely on unsupported features.
164-166
: Potential future extensions.Currently, only one
ACE_Event_Handler_var
is stored. If your use case evolves to handle multiple input sources or more complex logic, this approach must be revisited to avoid significant refactoring later.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (45)
.gitignore
(2 hunks)ACE/ace/ACE.inl
(2 hunks)ACE/ace/Asynch_Pseudo_Task.cpp
(1 hunks)ACE/ace/CDR_Size.h
(2 hunks)ACE/ace/CDR_Size.inl
(3 hunks)ACE/ace/CDR_Stream.cpp
(3 hunks)ACE/ace/CDR_Stream.h
(3 hunks)ACE/ace/CDR_Stream.inl
(3 hunks)ACE/ace/Flag_Manip.cpp
(2 hunks)ACE/ace/Malloc_Base.h
(1 hunks)ACE/ace/OS_NS_Thread.cpp
(19 hunks)ACE/ace/OS_NS_Thread.h
(3 hunks)ACE/ace/OS_NS_Thread.inl
(23 hunks)ACE/ace/OS_NS_arpa_inet.cpp
(1 hunks)ACE/ace/OS_NS_arpa_inet.inl
(2 hunks)ACE/ace/OS_NS_dirent.inl
(3 hunks)ACE/ace/OS_NS_fcntl.cpp
(1 hunks)ACE/ace/OS_NS_signal.inl
(6 hunks)ACE/ace/OS_NS_stdlib.cpp
(2 hunks)ACE/ace/OS_NS_sys_select.inl
(1 hunks)ACE/ace/OS_NS_sys_socket.inl
(3 hunks)ACE/ace/OS_NS_sys_stat.inl
(4 hunks)ACE/ace/OS_NS_sys_utsname.cpp
(1 hunks)ACE/ace/OS_NS_time.h
(1 hunks)ACE/ace/OS_NS_unistd.inl
(11 hunks)ACE/ace/Object_Manager.cpp
(1 hunks)ACE/ace/Object_Manager.h
(2 hunks)ACE/ace/Service_Config.cpp
(1 hunks)ACE/ace/Single_Input_Reactor.cpp
(1 hunks)ACE/ace/Single_Input_Reactor.h
(1 hunks)ACE/ace/Task.cpp
(1 hunks)ACE/ace/ace.mpc
(1 hunks)ACE/ace/config-integrity-common.h
(1 hunks)ACE/ace/config-integrity.h
(1 hunks)ACE/ace/config-integrity178.h
(1 hunks)ACE/ace/config-integritySCA.h
(7 hunks)ACE/ace/config-macros.h
(2 hunks)ACE/ace/os_include/os_fcntl.h
(1 hunks)ACE/ace/os_include/sys/os_types.h
(1 hunks)ACE/tests/Dynamic_Priority_Test.cpp
(1 hunks)ACE/tests/Task_Test.cpp
(1 hunks)TAO/tao/IIOP_Acceptor.cpp
(1 hunks)TAO/tao/Strategies/advanced_resource.cpp
(3 hunks)TAO/tao/Strategies/advanced_resource.h
(1 hunks)TAO/tao/default_resource.cpp
(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- TAO/tao/IIOP_Acceptor.cpp
- ACE/ace/Task.cpp
- ACE/ace/OS_NS_sys_select.inl
🧰 Additional context used
🪛 Cppcheck (2.10-2)
ACE/ace/Single_Input_Reactor.cpp
[error] 21-21: There is an unknown macro here somewhere. Configuration is required. If ACE_BEGIN_VERSIONED_NAMESPACE_DECL is a macro then please configure it.
(unknownMacro)
⏰ Context from checks skipped due to timeout of 90000ms (20)
- GitHub Check: ubuntu-20.04 g++-10 ACE for TAO
- GitHub Check: ubuntu-20.04 clang++-11
- GitHub Check: ubuntu-20.04 clang++-10
- GitHub Check: VS2022Release64
- GitHub Check: VS2022Debug64
- GitHub Check: VS2022WChar
- GitHub Check: VS2019Debug64Cxx20
- GitHub Check: VS2019Debug64Cxx17
- GitHub Check: VS2019Release32
- GitHub Check: VS2019Debug32
- GitHub Check: VS2019Release64
- GitHub Check: VS2019Debug64
- GitHub Check: macos-14-C++
- GitHub Check: windows-2019 vs2019
- GitHub Check: VS2019WChar
- GitHub Check: MINGW64-gcc
- GitHub Check: alpine-3.18
- GitHub Check: ubuntu-20.04 g++-10
- GitHub Check: macos-13-C++
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (99)
ACE/ace/ace.mpc (1)
220-220
: Looks good: New Single_Input_Reactor source added correctlyThe addition of
Single_Input_Reactor.cpp
to the source files list is properly placed in alphabetical order within the file list, maintaining the project's organization.ACE/tests/Task_Test.cpp (1)
125-125
: Fixed thread count is more appropriate for cross-platform testingChanging from
ACE_MAX_THREADS
to a fixed value of 3 is a good approach for consistent testing across different platforms, especially when adding support for RTOS environments where thread resources might be more constrained..gitignore (2)
20-24
: Appropriate additions for INTEGRITY environment filesThese new file patterns (*.gpj, *.int, *.cmd, etc.) appear to be specific to the Green Hills INTEGRITY development environment and should be ignored in version control.
40-42
: Build directories properly added to ignore listAdding these Visual Studio and static build directories ensures that build artifacts don't get accidentally committed to the repository.
ACE/ace/os_include/os_fcntl.h (1)
102-103
: Platform-specific nonblock definition for INTEGRITY178BThis addition correctly handles the INTEGRITY178B-specific case for non-blocking operations by defining
ACE_NONBLOCK
as 1, which is essential for proper I/O operations on this platform.ACE/ace/ACE.inl (2)
219-223
: Added Green Hills INTEGRITY support to socket operations.The change adds the
__ghs__
macro check alongside existingACE_WIN32
andACE_MQX
macros to useACE_OS::send
instead ofACE_OS::write
for Green Hills INTEGRITY RTOS. This properly extends the platform-specific I/O abstraction while maintaining backward compatibility.
229-233
: Added Green Hills INTEGRITY support to socket operations.Similar to the send operation, this change adds the
__ghs__
macro check to useACE_OS::recv
instead ofACE_OS::read
for Green Hills INTEGRITY RTOS. The implementation correctly maintains platform-specific socket behavior.ACE/ace/os_include/sys/os_types.h (1)
66-67
: Added INTEGRITY support for large file offset type.The change adds INTEGRITY to the platforms where
ACE_LOFF_T
is defined aslong long
. This ensures consistent large file offset handling across different RTOS platforms.ACE/tests/Dynamic_Priority_Test.cpp (1)
50-52
: Added INTEGRITY support to test header inclusion.The change extends the conditional inclusion of
ace/OS_NS_string.h
to include cases where theINTEGRITY
macro is defined, similar to the existing support for VXWORKS. This appropriately maintains consistent behavior for string operations across different RTOSes.ACE/ace/Malloc_Base.h (1)
189-191
:✅ Verification successful
Added conditional exception handling for Green Hills environment.
The change wraps the
std::bad_alloc
exception in a conditional check forACE_NO_GHS_EXCEPT
, allowing memory allocation failures to be handled differently when necessary for Green Hills INTEGRITY RTOS, which may have different exception handling requirements.Run the following to check for similar exception handling patterns:
🏁 Script executed:
#!/bin/bash # Check for similar exception handling patterns in the codebase echo "Looking for similar exception handling patterns..." rg -A 3 "defined \(ACE_NO_GHS_EXCEPT\)" --type cppLength of output: 1425
Conditional Exception Handling for Green Hills Environment Confirmed
The pattern in ACE/ace/Malloc_Base.h is consistent with similar exception handling found in ACE/ace/CDR_Stream.cpp. The check for
!defined(ACE_NO_GHS_EXCEPT)
properly guards the use ofstd::bad_alloc
to accommodate the differences in Green Hills INTEGRITY RTOS exception handling. No further changes are necessary.
- Location:
ACE/ace/Malloc_Base.h
(Lines 189-191)- Context: The code uses a conditional compilation directive to enable exception throwing for memory allocation failure only when
ACE_NO_GHS_EXCEPT
is not defined.- Consistency: Similar patterns are verified in
ACE/ace/CDR_Stream.cpp
.ACE/ace/Asynch_Pseudo_Task.cpp (1)
52-54
: Use ACE_OS namespace for signal functions - good change!The change to use
ACE_OS::sigemptyset
andACE_OS::sigaddset
instead of direct system calls improves platform independence. This is consistent with ACE's design philosophy of providing abstraction layers for system calls, and particularly important for supporting INTEGRITY RTOS platforms.TAO/tao/Strategies/advanced_resource.h (1)
68-68
: Added new TAO_REACTOR_SINGLE_INPUT enum valueThe addition of this new reactor type is appropriate for extending the reactor selection mechanism. This cleanly extends the enum without disrupting existing values, maintaining backward compatibility.
Based on the PR objectives, this change appears to be part of adding Green Hills INTEGRITY support, likely by enabling a reactor implementation that works well on this platform.
ACE/ace/OS_NS_time.h (1)
130-135
: Improved handling of potentialdifftime
macroThis change improves platform compatibility by addressing cases where
difftime
might be defined as a macro, similar to how other time functions are handled in this file. The pattern matches other helper functions in the same file (ace_asctime_r_helper
, etc.).The change follows the established pattern in this file where potentially macro-defined time functions are used and then undefined to avoid naming conflicts, enhancing compatibility with the INTEGRITY platform.
ACE/ace/Object_Manager.cpp (1)
242-245
: Appropriate INTEGRITY RTOS support added.The added code correctly preallocates the
ACE_INTEGRITY_TSS_Impl
object for the INTEGRITY and INTEGRITY-178 RTOS platforms. The conditional compilation guards ensure this code only activates when necessary (INTEGRITY defined, TSS emulation enabled, and no thread-specific storage).ACE/ace/OS_NS_dirent.inl (3)
25-27
: Enhanced error handling for closedir on platforms lacking this functionality.This addition properly handles the case where
ACE_LACKS_CLOSEDIR
is defined but none of the other platform-specific conditions are met, preventing compiler warnings about unused parameters.
44-46
: Improved platform compatibility for opendir.The added code enhances error handling when
ACE_LACKS_OPENDIR
is defined by marking the parameter as unused and returning the appropriate error indicator. This provides better support for platforms like INTEGRITY RTOS that may not support standard directory operations.
64-66
: Consistent error handling for readdir function.This change follows the same pattern as the other directory functions, adding proper error handling when
ACE_LACKS_READDIR
is defined. Marking the parameter as unused prevents compiler warnings, and returningACE_NOTSUP_RETURN(0)
correctly indicates the operation is not supported.TAO/tao/default_resource.cpp (2)
794-794
: Proper reactor instance management.Setting the global reactor instance ensures that other parts of the system can access this reactor through
ACE_Reactor::instance()
. This is important for proper functioning in environments like INTEGRITY RTOS.
801-801
: Clean reactor instance shutdown.Setting the reactor instance to null during cleanup is crucial to avoid dangling pointers and ensure proper shutdown sequence. This change prevents potential issues when the application terminates on the INTEGRITY platform.
ACE/ace/Object_Manager.h (2)
43-45
: Forward declaration for INTEGRITY TSS implementation.This forward declaration is appropriately guarded by the same preprocessor conditions as the implementation in Object_Manager.cpp, ensuring consistency across the codebase for INTEGRITY RTOS support.
306-308
: INTEGRITY TSS enum value added to Object_Manager.Adding the
ACE_INTEGRITY_TSS_IMPL
enum value to thePreallocated_Object
enumeration, with consistent preprocessor guards, correctly completes the integration of INTEGRITY TSS support in the object manager's preallocation system.ACE/ace/CDR_Size.h (2)
82-84
: Excellent addition of std::string_view support with proper conditional compilation.The new
write_string_view
method is correctly guarded by theACE_LACKS_STD_STRING_VIEW
preprocessor directive, allowing the codebase to supportstd::string_view
when available while maintaining backward compatibility with platforms that don't support it yet.
237-240
: Well-implemented << operator overload for std::string_view.This operator overload is consistently guarded with the same preprocessor directive as the method implementation, ensuring proper behavior across all platforms.
ACE/ace/OS_NS_stdlib.cpp (3)
1199-1206
: Good platform-specific adaptation for INTEGRITY.The implementation correctly handles the
__progname
variable differently for INTEGRITY platforms, making it a mutable pointer withconst_cast<char *>
rather than aconst char*
. The conditional compilation with nested checks forINTEGRITY
andACE_USES_GHS_ISIMPPC
is appropriate.
1223-1227
: Consistent INTEGRITY handling in setprogname_emulation.The modification to use
const_cast
for INTEGRITY is consistent with the variable declaration change. This allows the INTEGRITY implementation to modify the program name when needed.
1229-1233
: Consistent implementation for the else branch.The modifications consistently apply the same pattern to both branches of the conditional, ensuring uniform behavior across different code paths.
ACE/ace/OS_NS_sys_socket.inl (1)
138-141
: Good error handling for systems lacking socket close functionality.This change adds proper error handling for platforms that lack the
close
function for sockets via theACE_LACKS_CLOSE
directive. The implementation correctly uses theACE_UNUSED_ARG
andACE_NOTSUP_RETURN
macros for consistent error reporting.ACE/ace/CDR_Stream.cpp (3)
1710-1721
: Good defensive programming with memory allocationAdding exception handling here is a good practice to gracefully handle memory allocation failures when resizing the string. This makes the code more robust on platforms where exceptions are supported.
1770-1781
: Consistent error handling for memory allocationGood implementation of memory allocation error handling for wstring, matching the pattern used in the string handling implementation and maintaining consistency throughout the codebase.
1790-1801
: Proper exception handling for the second wstring resize caseThe exception handling is correctly implemented in this second case where the wstring is resized in a different code path. This ensures consistent behavior regardless of which branch the code follows.
ACE/ace/OS_NS_fcntl.cpp (2)
109-114
: Clear handling for systems that lack open supportGood implementation for systems where open is not available. The code properly marks all arguments as unused and returns an appropriate error code.
116-119
: Simplified file opening for INTEGRITY178BThe specialized handling for INTEGRITY178B provides a simpler and more direct path to the underlying open call, which is good for maintainability.
ACE/ace/Service_Config.cpp (1)
302-306
: Simplified signal handling initializationRemoving the complex signal handler registration while keeping the reactor initialization is a good simplification. This reduces platform-specific code and potential issues with signal handling, which is particularly beneficial for the Green Hills INTEGRITY RTOS.
ACE/ace/OS_NS_sys_utsname.cpp (3)
217-225
: Robust error handling for gethostname functionalityGood defensive programming by adding a check for systems that lack gethostname and validating the input parameter. These changes prevent potential crashes or undefined behavior.
226-232
: Updated system identification for INTEGRITY-178BProper support for INTEGRITY-178B with specific version information. This enhances platform detection capabilities and provides accurate system information.
233-237
: Updated version information for standard INTEGRITYThe version update for standard INTEGRITY ensures the system information remains current and accurate. Using a consistent approach for both INTEGRITY variations makes the code more maintainable.
ACE/ace/CDR_Stream.inl (2)
371-380
: Well-implemented support for std::string_viewThe addition of the
write_string_view
method properly handles string views by extracting the length and data pointer. The conditional compilation ensures backward compatibility with environments lacking std::string_view support.
399-406
: Consistent implementation of operator<< for string_viewThe operator overload follows the same pattern as the existing string operators, ensuring consistent behavior across different string types.
ACE/ace/CDR_Size.inl (2)
155-164
: Good implementation of write_string_view for ACE_SizeCDRThe implementation correctly handles std::string_view by using its size() and data() methods, properly checking for empty views. Matches the implementation pattern used in ACE_OutputCDR.
413-420
: Consistent operator<< overload for string_viewThe operator implementation correctly delegates to the write_string_view method, maintaining the same pattern as other operator<< overloads in this class.
ACE/ace/config-integrity-common.h (1)
1-182
: Comprehensive configuration for INTEGRITY RTOSThis new file provides a thorough set of configuration macros for the INTEGRITY operating system. The implementation includes:
- Detailed specification of missing features via ACE_LACKS_* macros
- Proper definition of available features via ACE_HAS_* macros
- Thread priority settings customized for INTEGRITY
- Appropriate header inclusions and type definitions
The conditional section for ACE_NO_GHS_LIBIO (lines 158-178) provides good flexibility for environments without the INTEGRITY-178 Low-Level I/O Library.
ACE/ace/config-macros.h (2)
523-523
: Updated comment for INTEGRITY supportThe comment now correctly references INTEGRITY instead of pSoS, consistent with the PR's objective of updating INTEGRITY RTOS support.
534-539
: Added INTEGRITY-specific thread function return typeThe implementation defines ACE_THR_FUNC_RETURN as int for INTEGRITY, with clear documentation explaining why this is needed. The comment explains how this is used by ACE's internal thread adapter function but ignored by the actual entry point passed to INTEGRITY's Task calls.
ACE/ace/CDR_Stream.h (3)
60-63
: Provide tests for std::string_view inclusion.Including
<string_view>
and conditionally compiling it under#if !defined(ACE_LACKS_STD_STRING_VIEW)
is a good approach. To ensure robust integration, consider adding tests (perhaps in a dedicated test suite) that confirm this header is properly found and that all string-view related functionality compiles and runs in both supported and fallback scenarios.
291-293
: Confirm correct usage and implementation of write_string_view.The newly introduced
write_string_view
method is guarded by#if !defined (ACE_LACKS_STD_STRING_VIEW)
, which is consistent with the new conditional compilation approach. Ensure you have a corresponding definition and usage tests. It would be prudent to confirm no overlap or ambiguity arises with existing write methods forstd::string
.
1447-1450
: Evaluate potential overload conflicts for operator<<(std::string_view).Adding an operator<< for
std::string_view
is valuable for modern C++ usage. However, check for potential overload ambiguities if there's already an operator<< forstd::string
. Verify that calls with literals or other string-like types do not inadvertently resolve to the wrong overload.ACE/ace/OS_NS_signal.inl (6)
73-74
: Clarify INTEGRITY and ACE_LACKS_POSIX handling for sigaction.The fallback path returns with
ACE_NOTSUP_RETURN(-1)
when bothINTEGRITY
andACE_LACKS_POSIX
are defined. This is consistent with a platform lacking complete POSIX signal APIs. If the macro detection has edge cases, consider documenting them more explicitly to avoid confusion.
88-93
: Consistent fallback for ACE_LACKS_SIGADDSET.Returning -1 with not supported is consistent. Just ensure that all callers handle the -1 return path gracefully, especially if signals are crucial for the calling logic.
114-118
: Consistent fallback for ACE_LACKS_SIGDELSET.Same pattern of skipping functionality and returning -1. Confirm that is the intended design and that no caller expects partial behavior.
139-142
: Consistent fallback for ACE_LACKS_SIGEMPTYSET.Again, returning -1 for unsupported. Ensure test coverage exists for these edge macros.
158-161
: Consistent fallback for ACE_LACKS_SIGFILLSET.Behavior matches the other signal-set macros. No immediate concerns; maintain a uniform approach throughout the codebase.
177-181
: Consistent fallback for ACE_LACKS_SIGISMEMBER.Returning -1 is consistent with the pattern. This completes the granularity of checking each individual signal-set function.
ACE/ace/OS_NS_arpa_inet.inl (1)
55-67
: Validate coverage for inet_ntoa fallback case.The conditional block
#if !(defined (INTEGRITY) && defined (ACE_LACKS_INET_NTOA))
ensures standardinet_ntoa
usage if available. Ensure that any custom fallback implementation inACE/ace/OS_NS_arpa_inet.cpp
is exercised by platform-specific tests, especially on INTEGRITY.ACE/ace/OS_NS_unistd.inl (3)
1048-1050
: Special case handling for INTEGRITY's sysconf implementation.The addition of a specific INTEGRITY case for sysconf is a good improvement that returns a predefined page size rather than an error code, making the platform more usable.
957-967
: Enhanced sleep() implementation for platforms lacking select.Good enhancement to properly handle platforms where select() is not available by marking arguments as unused and returning the appropriate error code.
Also applies to: 969-977
112-115
: Consistent error handling for unsupported operations.The changes follow a consistent and robust pattern for handling unsupported operations across multiple functions (chdir, rmdir, close, ftruncate, getcwd, lseek, read, write). This approach properly marks unused arguments and returns appropriate error codes, improving platform compatibility.
Also applies to: 137-140, 172-174, 375-376, 387-390, 666-670, 717-721, 1192-1196
ACE/ace/config-integrity.h (3)
6-74
: Well-structured configuration for INTEGRITY RTOS support.This configuration file appropriately identifies POSIX limitations in the INTEGRITY environment and provides necessary workarounds. The comprehensive list of ACE_LACKS_* macros aligns with the error handling changes in implementation files, creating a cohesive approach to INTEGRITY support.
19-23
: Intentional TSS emulation for compatibility with INTEGRITY-178.Good design decision to use thread-specific storage emulation even though INTEGRITY supports TSS natively. The comment clearly explains this is for compatibility with INTEGRITY-178, which helps future maintainers understand this deliberate choice.
12-15
: Effective workaround for UserException name conflict.The ORBEXPRESS macro definition prevents header conflicts with INTEGRITY's UserException, showing attention to detail in handling integration challenges between the frameworks.
ACE/ace/OS_NS_sys_stat.inl (1)
22-25
: Consistent error handling for unsupported file operations.The changes follow the same robust pattern seen in other files, marking unused arguments and returning appropriate error codes for unsupported operations. This enhances platform compatibility while maintaining clean code that won't generate compiler warnings.
Also applies to: 68-69, 155-157, 203-204
TAO/tao/Strategies/advanced_resource.cpp (3)
28-28
: Header inclusion for new reactor implementation.The header inclusion for Single_Input_Reactor follows the same pattern as other reactor headers, maintaining consistency in the codebase.
200-201
: Command-line option for the new Single_Input_Reactor.The command-line argument handling for "single_input" follows the same pattern as other reactor types, ensuring consistency in how the application is configured.
479-481
:✅ Verification successful
Simple instantiation of the new reactor.
The instantiation of ACE_Single_Input_Reactor is notably simpler than other reactors, which take several arguments. Verify that this simpler instantiation is intentional and whether additional configuration parameters should be passed.
🏁 Script executed:
#!/bin/bash # Check if ACE_Single_Input_Reactor constructor takes parameters grep -A 10 "ACE_Single_Input_Reactor::" ACE/ace/Single_Input_Reactor.cpp | grep -E "ACE_Single_Input_Reactor\s*\("Length of output: 114
I'll generate an additional verification script to search for the constructor definition of
ACE_Single_Input_Reactor
across both header and source files to ensure we capture any signature with parameters. This will help us confirm whether the simple instantiation is intentional.
🏁 Script executed:
#!/bin/bash echo "Searching for the constructor definition in cpp files:" grep -R "ACE_Single_Input_Reactor::ACE_Single_Input_Reactor(" -n . echo "Searching for the class declaration in header files:" grep -R "class ACE_Single_Input_Reactor" -n .Length of output: 445
Verification Outcome: Minimal Instantiation Confirmed
After further investigation, the search for a parameterized constructor in both source and header files revealed that
ACE_Single_Input_Reactor
is declared in the header without any constructor signature indicating additional parameters. This suggests that its simple instantiation inadvanced_resource.cpp
is intentional. Ensure that any reactor-specific configuration that might be required is handled elsewhere (if applicable).ACE/ace/Flag_Manip.cpp (2)
60-79
: Conditional logic for non-blocking on GHS simulator is consistent.
WhenACE_USES_GHS_ISIMPPC
is defined, the code short-circuits for theACE_NONBLOCK
flag and otherwise delegates to the helper function when available. This approach is consistent with the simulator’s known limitations. The switch statement is concise and aligns with existing patterns in ACE for platform-specific overrides.
116-129
: Consistent conditional handling for clearing flags.
Similar to theset_flags
approach, returning 0 forACE_NONBLOCK
underACE_USES_GHS_ISIMPPC
keeps the simulator happy while other flags route toclr_flags_helper()
. This maintains consistency across the code and prevents attempts to clear unsupported flags.ACE/ace/config-integrity178.h (4)
1-19
: Header guard and RTOS version macro introduced successfully.
DefiningINTEGRITY178B
and includingconfig-integrity-common.h
here is a suitable approach for distinguishing this specialized variant of INTEGRITY. Ensure all dependent build scripts and project files properly reference this new header to activate the correct macros.
23-73
: Extensive POSIX omission macros.
By grouping many “LACKS” macros under#if defined ACE_LACKS_POSIX
, you accurately communicate the features unavailable in INTEGRITY-178B. However, a large number of omitted calls may hide partially supported features. If partial support evolves, consider splitting these definitions or verifying them more granularly to reduce potential confusion down the road.
75-106
: Selective network stack exclusion.
UnderACE_NO_GHNET178_LIBNET
, you’re correctly disabling higher-level network utilities while retaining basic socket functions throughlibsocket.a
. This helps keep the build minimal on resource-constrained RTOS targets. Ensure that any TAO or ACE features requiring these omitted utilities are conditionally excluded to avoid linker errors or unresolved symbols.
108-116
: C++17 and POSIX feature macros.
Marking outACE_LACKS_STD_STRING_VIEW
aligns with the known limitations of this platform’s standard library. Double-check other C++17 capabilities likestd::optional
orstd::filesystem
if you plan on using them in the future, as they might also be missing.ACE/ace/config-integritySCA.h (4)
3-16
: Updated header guard and RTOS version reference.
Renaming the guard toACE_CONFIG_INTEGRITYSCA_H
and updating references to version 11.4.x clarifies the intended environment. This reduces confusion for users migrating from olderACE_INT_CONFIG_H
references. The new comments effectively convey that POSIX APIs are available.
35-50
: Exception and standard library features.
Enabling C++ exception support (ACE_HAS_EXCEPTIONS
) and the standard library ensures broader compatibility with modern C++ patterns. Confirm that the GHS compiler for this INTEGRITY version also supports these exception features thoroughly, as partial exceptions can lead to unexpected behavior.
190-191
: Namespace usage and RCSID toggling.
DefiningACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB
and disablingACE_USE_RCSID
is a standard housekeeping measure. There should not be any adverse effects, but verify that third-party code using RCS strings or relying on non-namespace calls is unaffected.
228-228
: End of header guard.
Everything is properly closed out with#endif
. No concerns here.ACE/ace/OS_NS_Thread.h (3)
233-267
: Definitions for INTEGRITY look consistent.
These type and macro definitions cleanly extend thread abstractions to INTEGRITY. The code is logically consistent, and using a counting semaphore initialized with 1 as a mutex aligns with other ACE patterns on platforms lacking dedicated mutex APIs.
268-273
: Forward declarations are straightforward.
Forward declaringthread_mutex_lock
andthread_mutex_unlock
insideACE_OS
is clear. Please confirm that the definitions in the corresponding.cpp
file match these signatures.
274-289
: RAII LockGuard implementation is good.
This simple struct properly enforces a lock/unlock sequence. Consider adding error checking ifthread_mutex_lock
can fail, but if the environment guarantees success, this is fine.ACE/ace/OS_NS_Thread.cpp (13)
204-210
: Use of named mutex guard improves clarity.
The newly introducedguard
variable clarifies the scope of the lock and makes the code more readable. No functional issues found.
215-220
: Consistent naming for recursive mutex guard.
Same improvement as above: readability is enhanced with a named guard. Everything looks good.
256-260
: Minor clarity improvement by naming the guard.
The change to a namedACE_OS_Recursive_Thread_Mutex_Guard
instance is consistent with the preceding segments. No concerns noted.
273-277
: No issues with guard instantiation.
Naming the guard here, too, seems consistent with the approach in the other TSS Emulation methods.
1154-1158
: Adding INTEGRITY to the conditional block.
Extending the existing#if defined (ACE_VXWORKS) || defined (ACE_MQX)
condition to includeINTEGRITY
looks correct. Ensures the same semaphore-based flow is used.
1178-1180
: Condition variable destruction logic extended for INTEGRITY.
IncludingINTEGRITY
in the#elif
ensures proper handling incond_destroy
. The code is consistent with the other platforms.
1228-1230
: INTEGRITY condition-object initialization check.
Similarly includingINTEGRITY
in thecond_init
path forwaiters_done_
respects the existing pattern for VxWorks and MQX.
1258-1260
: Wide-char condition init now covers INTEGRITY.
This mirrors the logic in the non-wide version and is consistent with the approach for other platforms.
1925-1934
: mutex_init: Introducing INTEGRITY branch.
The new branch for INTEGRITY is consistent with the existing pattern for VxWorks. Ensuring the correct semaphore or handle is created looks fine.
1975-1976
: mutex_destroy: INTEGRITY branch calling sema_destroy.
Destroying the semaphore for the INTEGRITY path is consistent with the rest of the code. Change looks straightforward.
2070-2072
: mutex_lock for INTEGRITY uses WaitForSemaphore.
This mirrors the approach taken for VxWorks (semTake
). Implementation appears correct.
3925-4057
: thr_create logic for INTEGRITY and INTEGRITY-178B.
The custom calls (e.g.,SetupTask
vs.CommonCreateTask
) and dynamic stack usage are valid approaches. Just ensure the deallocation path is robust for tasks that exit unexpectedly and that stack management is thoroughly tested.Please verify that tasks created this way are properly cleaned up under all exit conditions (normal and abnormal).
4221-4282
: thr_join for INTEGRITY.
This implementation uses a global map of semaphores to sync with the joined thread’s exit. The logic is coherent. No immediate concerns beyond ensuring the map is pruned properly on all exit paths.ACE/ace/OS_NS_Thread.inl (8)
1-1
: Cppcheck unknown macro warning.The static analysis tool reports an unknown macro for
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
. This is a known ACE macro. No functional code change is required; please adjust the static analysis configuration to recognize it.
23-25
: Clarify conditional usage for INTEGRITY TSS.These lines add a specific conditional block for the INTEGRITY OS when using TSS emulation. Ensure that all references to
ACE_INTEGRITY_TSS_Impl
are linked in the build and that the code is tested for multi-thread scenarios, as TSS typically involves concurrency complexities.
54-57
: Consider verifying pointer validity.When retrieving
ACE_INTEGRITY_TSS_Impl* obj
, confirm it is not null before dereferencing. IfACE_INTEGRITY_TSS_IMPL
were not allocated, accessingobj->get()
could lead to undefined behavior.
1749-1756
: Check for concurrency edge cases.Calling
::CreateSemaphore(count, s)
sets up the semaphore on INTEGRITY. Ensure the system call’s parameters align with intended concurrency semantics, including the maximum possible count and the initial count. Otherwise, resource limits may be unintentionally exceeded or underutilized.
1894-1895
: Confirm ReleaseSemaphore usage.When using
::ReleaseSemaphore(*s)
, verify that its return valueSuccess
consistently denotes full success. Ensure the function’s behavior matches typical semaphore post semantics, particularly regarding potential error conditions.
2000-2001
: Validate trylock semantics.In
sema_trywait()
, returning0
forSuccess
or-1
otherwise should match a non-blocking semaphore acquisition. Confirm it aligns with the broader ACE expectations on a “try” operation.
2555-2560
: Ensure priority retrieval logic is robust.The
GetActivePriority()
call might be subject to range constraints. Ensure that special or idle threads cannot produce unexpected values, and confirm no off-by-one scenarios arise for maximum or minimum priorities.
3172-3173
: Verify thread halt approach.
::HaltTask(target_thread)
may be irreversible, effectively killing the thread. If the intent is a suspend/resume model, investigate whether INTEGRITY offers a different call for true suspension.ACE/ace/Single_Input_Reactor.cpp (1)
22-35
: Validate handle registration.
register_handler
simply overwritesevent_handler_
and disables non-blocking. Confirm there is no existing handler to prevent overwriting, and ensure that the handle is valid. Also, consider the lifecycle if multiple registrations inadvertently occur without removal.ACE/ace/Single_Input_Reactor.h (1)
13-67
: Review placeholders in reactor methods.Most methods return a default value or 0. Confirm they won't be unexpectedly called by other ACE/TAO components (e.g., timers, signals), as it could yield silent failures or missing functionality.
case TAO_REACTOR_SINGLE_INPUT: | ||
ACE_NEW_RETURN (impl, ACE_Single_Input_Reactor, 0); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
No platform-specific checks for ACE_Single_Input_Reactor.
Unlike other reactor implementations (like WFMO or Dev_Poll) that have platform-specific guards, the Single_Input_Reactor doesn't have any conditional compilation directives. Verify that this reactor type is indeed intended to be available on all platforms.
🏁 Script executed:
#!/bin/bash
# Check for any platform-specific limitations in the Single_Input_Reactor implementation
grep -E "#if|#ifdef|#ifndef" -A 2 ACE/ace/Single_Input_Reactor.h | grep -E "ACE_WIN32|ACE_HAS_|ACE_LACKS_"
Length of output: 125
Platform-Specific Check Required for ACE_Single_Input_Reactor
The header file for ACE_Single_Input_Reactor contains an #ifdef ACE_WIN32
directive, indicating it’s intended for Windows platforms. However, in TAO/tao/Strategies/advanced_resource.cpp
(lines 479–481), the reactor is instantiated unconditionally. Please:
- Confirm whether
TAO_REACTOR_SINGLE_INPUT
is meant to be available on all platforms. - If it’s Windows-specific, wrap the instantiation with the appropriate
#ifdef ACE_WIN32
/#endif
to prevent build issues on unsupported platforms. - Alternatively, adjust or document the behavior if non-Windows platforms are to support this reactor.
#define ACE_LACKS_CUSERID | ||
#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 0x5000 | ||
#define fileno(file) ((file)->io_channel) //Hack to get Svc_Conf_l.cpp compiled | ||
#define ACE_HAS_ATTR_SETSCHED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Hacky redefinition of fileno.
Using a macro-based hack for fileno(file)
to reference (file)->io_channel
can be fragile. If the underlying library changes or if file
is no longer a pointer to an appropriate structure, this could break. Consider wrapping this in a function or clarifying the assumptions behind this hack for future maintainers.
# elif defined (INTEGRITY) | ||
// Make sure the semaphore's value does not exceed its initial value, which is 1. | ||
// This guards against incorrect unlocks from threads without holding the lock. | ||
// This, however, does not prevent a race when two or more threads call this function | ||
// simultaneously and the calls to GetSemaphoreValue and ReleaseSemaphore interleave. | ||
// In that case, the semaphore's value could raise to above 1. | ||
// So, only call unlock when know for sure the thread is holding the lock! | ||
SignedValue curr_val; | ||
if (::GetSemaphoreValue (*m, &curr_val) != Success) | ||
return -1; | ||
|
||
if (curr_val == 1) | ||
{ | ||
errno = EPERM; | ||
return -1; | ||
} | ||
return ::ReleaseSemaphore (*m) == Success ? 0 : -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential concurrency race in mutex_unlock for INTEGRITY.
While this code checks if the semaphore’s value is already at 1 to avoid incrementing it further, multiple threads calling mutex_unlock
in tight succession might still cause a race (the calls to GetSemaphoreValue()
and ReleaseSemaphore()
can interleave). This can break mutex logic if multiple unlocks occur without proper ownership checks.
To strengthen reliability, consider tracking lock ownership or adding atomic checks via a more robust approach (e.g., the OS’s built-in mutex mechanism if available).
@@ -17,6 +17,11 @@ | |||
*S_T.inl | |||
*.bmak | |||
*.recipe | |||
*.gpj | |||
*.int | |||
*.cmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmd
is a common extension for windows batch files. There is one in the tree, though I don't think it's important. I'm not sure what we can do about this if integrity is using it though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to add *.cmd
to ignores in this PR. In general, we could remove all tool-specific files from .gitignore and let each user configure their own .git/info/exclude or similar.
Since #2339 was recently merged, you may want an explicit merge from the master branch to pick up the updates to the CI configuration |
@@ -1,3 +1,4 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -47,7 +47,7 @@ | |||
#include "ace/High_Res_Timer.h" | |||
#include "ace/Sched_Params.h" | |||
|
|||
#if defined (VXWORKS) | |||
#if defined (VXWORKS) || defined (INTEGRITY) | |||
# include "ace/OS_NS_string.h" | |||
#endif /* VXWORKS */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#endif /* VXWORKS */ | |
#endif |
@@ -216,7 +216,7 @@ ACE::sendv_n (ACE_HANDLE handle, | |||
ACE_INLINE ssize_t | |||
ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len) | |||
{ | |||
#if defined (ACE_WIN32) || defined (ACE_MQX) | |||
#if defined (ACE_WIN32) || defined (ACE_MQX) || defined (__ghs__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following convention, shouldn't macros like __ghs__
and INTEGRITY
have their own ACE_*
counterparts?
@@ -1707,14 +1707,18 @@ ACE_InputCDR::read_string (std::string& x) | |||
// the memory is allocated. | |||
if (len > 0 && len <= this->length()) | |||
{ | |||
#if !defined (ACE_NO_GHS_EXCEPT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this macro is new, maybe it could have a better name? Like ACE_LACKS_EXCEPTIONS
or ACE_LACKS_STD_EXCEPTIONS
? I don't know what the platform supports, so I don't know what I'm the scope of this is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does integrity handle a resize error? Shouldn't be there some alternative code instead to handle the error cases?
|
||
struct StackInfo | ||
{ | ||
StackInfo () : id(0), occupied(false) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use uniform initialization to simplify this
private: | ||
struct TaskInfo | ||
{ | ||
TaskInfo () : id(0), tss_base(0), valid(false) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uniform initialization would simplify this
@@ -20,8 +20,10 @@ closedir (ACE_DIR *d) | |||
delete d; | |||
# elif defined (ACE_HAS_WCLOSEDIR_EQUIVALENT) && defined (ACE_USES_WCHAR) | |||
ACE_HAS_WCLOSEDIR_EQUIVALENT (d); | |||
# else /* ACE_WIN32 && ACE_LACKS_CLOSEDIR */ | |||
# elif !defined (ACE_LACKS_CLOSEDIR) /* ACE_WIN32 && ACE_LACKS_CLOSEDIR */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Find it more readable when you first would check defined (ACE_LACKS_CLOSEDIR)
, and the normal case in the else part
#define ACE_LACKS_SYS_SHM_H | ||
#define ACE_LACKS_TERMIOS_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there maybe any other parts that could be cleaned because some lacks macros are not used anymore (integrity maybe the last to need a certain workaround)?
@@ -122,7 +122,7 @@ run_main (int, ACE_TCHAR *[]) | |||
// Set the thread hook! | |||
ACE_Thread_Hook::thread_hook (new My_Thread_Hook); | |||
|
|||
int n_threads = ACE_MAX_THREADS; | |||
int n_threads = 3; //ACE_MAX_THREADS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to revert?
@@ -791,12 +791,14 @@ TAO_Default_Resource_Factory::get_reactor () | |||
else | |||
this->dynamically_allocated_reactor_ = true; | |||
|
|||
ACE_Reactor::instance (reactor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look a good thing to just replace the singleton reactor with the one created by TAO, something to revert, also reclaim
@@ -171,9 +187,12 @@ extern "C" | |||
#define ACE_LACKS_READLINK | |||
#define ACE_LACKS_GETPPID | |||
#define NSIG (SIGRTMAX+1) | |||
#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 | |||
#define ACE_USE_RCSID 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACE_USE_RCSID is not used anymore
Summary by CodeRabbit
New Features
Bug Fixes
Refactor/Chores