Skip to content

Support thread names on Windows and Integrity#2370

Merged
mitza-oci merged 7 commits into
DOCGroup:masterfrom
mitza-oci:thread-names
Apr 28, 2025
Merged

Support thread names on Windows and Integrity#2370
mitza-oci merged 7 commits into
DOCGroup:masterfrom
mitza-oci:thread-names

Conversation

@mitza-oci
Copy link
Copy Markdown
Member

@mitza-oci mitza-oci commented Apr 24, 2025

  • Support thread names on Windows and Integrity
  • Threads that TAO creates in TAO_Thread_Per_Connection_Handler are named
  • A few small tweaks to the Green Hills Integrity port

Summary by CodeRabbit

  • New Features

    • Added a method to set thread names on Windows and INTEGRITY platforms, improving thread identification.
    • Introduced a new public method to activate thread-per-connection handlers with named threads.
  • Bug Fixes

    • Improved platform detection and error handling for thread-related functions to better support unsupported platforms.
  • Refactor

    • Cleaned up and standardized pointer formatting and parameter naming in thread-related APIs.
    • Simplified switch statement formatting and removed unreachable or redundant code in several components for improved code clarity.
  • Chores

    • Added a platform-specific macro definition for INTEGRITY to support ioctl operations.
    • Updated comments for clarity.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2025

Walkthrough

This update introduces support for setting thread names during thread creation on Windows and INTEGRITY platforms in the ACE library. The main implementation occurs in ACE_OS::thr_create, where, after thread creation, the thread name is set using platform-specific APIs if provided. Additionally, the INTEGRITY configuration header defines a new macro for ioctl argument types. Several files are updated for consistent pointer spacing in function signatures and parameter declarations, but these changes are purely stylistic. Minor platform-specific improvements, error handling clarifications, and a new method for thread activation with named threads are also included.

Changes

File(s) Change Summary
ACE/ace/OS_NS_Thread.cpp Adds support for setting thread names on Windows and INTEGRITY in thr_create; minor formatting for VxWorks calls.
ACE/ace/OS_NS_Thread.h, ACE/ace/Thread.h, ACE/ace/Thread.inl, ACE/ace/Thread_Manager.h, ACE/ace/Thread_Manager.cpp, ACE/ace/Thread.cpp Standardizes pointer spacing in thr_name parameters in thread-related function and method signatures; no logic changes. Adds parameter name to spawn_i.
ACE/ace/OS_NS_Thread.inl Improves platform detection and error handling in sigwait and thr_name functions.
ACE/ace/Sock_Connect.cpp Changes ioctl command variable type to platform-specific ACE_IOCTL_TYPE_ARG2.
ACE/ace/config-integrity-common.h Adds macro definition for ACE_IOCTL_TYPE_ARG2 as unsigned long for INTEGRITY.
ACE/ace/Stack_Trace.cpp Restricts static inline helper function to relevant platforms using preprocessor checks.
TAO/tao/GIOP_Message_Base.cpp, TAO/tao/Transport.cpp, TAO/tao/ORB_Core.cpp Removes redundant/unreachable break statements and unnecessary braces in switch statements; no logic changes.
TAO/tao/Thread_Per_Connection_Handler.cpp, TAO/tao/Thread_Per_Connection_Handler.h Adds new method activate_ch to allow thread activation with custom thread names.
TAO/tao/Stub.inl Minor comment edit.
TAO/tao/Acceptor_Impl.cpp Changes call from activate to new activate_ch method for thread-per-connection handler activation.
ACE/NEWS, TAO/NEWS Updates release notes to document thread naming support and new activation method.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant ACE_OS
    participant OS_API

    Caller->>ACE_OS: thr_create(..., thr_name)
    ACE_OS->>OS_API: Create thread
    alt Platform is Windows or INTEGRITY and thr_name provided
        ACE_OS->>OS_API: Set thread name using platform API
    end
    ACE_OS-->>Caller: Return thread handle/result
Loading
sequenceDiagram
    participant User
    participant TAO_Thread_Per_Connection_Handler
    participant ACE_Thread_Base

    User->>TAO_Thread_Per_Connection_Handler: activate_ch(flags, n_threads)
    TAO_Thread_Per_Connection_Handler->>TAO_Thread_Per_Connection_Handler: Generate thread names
    TAO_Thread_Per_Connection_Handler->>ACE_Thread_Base: activate(flags, n_threads, ..., thread_names)
    ACE_Thread_Base-->>TAO_Thread_Per_Connection_Handler: Result
    TAO_Thread_Per_Connection_Handler-->>User: Result
Loading

Possibly related PRs

  • DOCGroup/ACE_TAO#2340: Updates and improves support for Green Hills INTEGRITY and INTEGRITY-178 RTOS, including changes to thread management in ACE/ace/OS_NS_Thread.cpp and related headers, directly overlapping with the current changes.

Suggested reviewers

  • jwillemsen

Poem

In the warren where threads are spun,
Now each can have a name, not just "one"!
Windows and INTEGRITY, hear the call—
Your threads march proudly, labeled for all.
No more pointer squabbles or breaks astray,
Just tidy code and names on display.
🐇✨ Hooray for threads with identity today!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91d25a5 and 473396d.

📒 Files selected for processing (4)
  • ACE/NEWS (1 hunks)
  • TAO/NEWS (1 hunks)
  • TAO/tao/Acceptor_Impl.cpp (1 hunks)
  • TAO/tao/Thread_Per_Connection_Handler.h (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • ACE/NEWS
  • TAO/NEWS
🚧 Files skipped from review as they are similar to previous changes (1)
  • TAO/tao/Thread_Per_Connection_Handler.h
⏰ Context from checks skipped due to timeout of 90000ms (21)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: alpine-3.18
  • GitHub Check: ubuntu-24.04 clang++-15
  • GitHub Check: ubuntu-24.04 g++-10 wchar
  • GitHub Check: ubuntu-24.04 g++-12
  • GitHub Check: ubuntu-24.04 g++-10 CORBA/e micro
  • GitHub Check: ubuntu-24.04 g++-10 CodeQL
  • GitHub Check: ubuntu-24.04 g++-14
  • GitHub Check: ubuntu-24.04 g++-10 CORBA/e compact
  • GitHub Check: ubuntu-24.04 clang++-14
  • GitHub Check: ubuntu-24.04 g++-10 ACE for TAO
  • GitHub Check: ubuntu-24.04 clang++-16
  • GitHub Check: ubuntu-24.04 g++-13
  • GitHub Check: ubuntu-24.04 g++
  • GitHub Check: ubuntu-24.04 g++-11
  • GitHub Check: ubuntu-22.04 g++-9
  • GitHub Check: ubuntu-22.04 g++-10
  • GitHub Check: MINGW64-gcc
  • GitHub Check: macos-14-C++
  • GitHub Check: macos-13-C++
  • GitHub Check: windows-2019 vs2019
🔇 Additional comments (1)
TAO/tao/Acceptor_Impl.cpp (1)

129-130: Change looks good: properly implements thread naming support

The change from activate to activate_ch correctly implements the PR's objective of supporting thread names on Windows and Integrity platforms. This is a clean, minimal change that maintains the same parameter structure while enabling the new thread naming functionality.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
TAO/tao/Thread_Per_Connection_Handler.cpp (3)

26-64: Well-structured implementation for thread name management

The new activate_ch method provides thread naming support for the connection handler, improving debugging and monitoring capabilities. Each thread is assigned a descriptive name that includes its index.

Some observations:

  • The method properly checks TAO_debug_level before logging
  • The implementation carefully handles memory by using ACE containers
  • The thread name format is clear and informative
  • The proper cast to static_cast<size_t> is used when accessing vector elements

However, there's a potential issue with the thread name buffer initialization:

- ACE_CString buffer = "          ";
+ ACE_CString buffer(10, ' ');  // Create a 10-character space string

The current approach creates a fixed string of spaces that may not be sufficient for all thread indexes. Using the constructor with count and character would be more explicit about the intent.

🧰 Tools
🪛 Cppcheck (2.10-2)

[error] 33-33: There is an unknown macro here somewhere. Configuration is required. If ACE_TEXT is a macro then please configure it.

(unknownMacro)


43-43: Consider using safer string conversion for thread indices

Using ACE_OS::itoa with fixed-size buffer could potentially overflow if dealing with very large thread indices. Consider using a more robust conversion method or ensuring sufficient buffer size.

- ACE_OS::itoa (static_cast<ACE_INT32> (i), &buffer[0], 10);
+ char temp[32]; // Sufficient for any integer
+ ACE_OS::snprintf(temp, sizeof(temp), "%d", static_cast<ACE_INT32>(i));
+ buffer = temp;

39-45: Vector initialization can be optimized

The vector is created with a size of n_threads but then elements are added with push_back(), which could cause unnecessary reallocations. Consider directly populating the vector at the correct indices.

- ACE_Vector<ACE_CString> names (n_threads);
- for (int i = 0; i < n_threads; ++i)
-   {
-     ACE_CString buffer = "          ";
-     ACE_OS::itoa (static_cast<ACE_INT32> (i), &buffer[0], 10);
-     names.push_back ("TAO_Thread_Per_Connection_Handler " + buffer);
-   }
+ ACE_Vector<ACE_CString> names;
+ names.size(n_threads);
+ for (int i = 0; i < n_threads; ++i)
+   {
+     char buffer[32];
+     ACE_OS::snprintf(buffer, sizeof(buffer), "%d", static_cast<ACE_INT32>(i));
+     names[i] = "TAO_Thread_Per_Connection_Handler " + ACE_CString(buffer);
+   }
ACE/ace/OS_NS_Thread.cpp (1)

3885-3888: Added support for named threads on Windows

This change implements thread naming support for Windows by using the SetThreadDescription API. This is a valuable addition that:

  1. Improves debugging capabilities
  2. Makes threads easier to identify in profiling tools
  3. Maintains consistent behavior with other platforms

The code properly checks for null conditions before setting the thread name.

Note that SetThreadDescription was added in Windows 10 and might not be available in older Windows versions. Consider adding a backward compatibility check:

+ #if defined(_WIN32) && defined(NTDDI_WIN10_RS1) && (NTDDI_VERSION >= NTDDI_WIN10_RS1)
  if (thr_name && *thr_name && *thr_handle)
    {
      SetThreadDescription (*thr_handle, ACE_TEXT_ALWAYS_WCHAR (*thr_name));
    }
+ #endif
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ba4a19 and e719fa3.

📒 Files selected for processing (17)
  • ACE/ace/OS_NS_Thread.cpp (5 hunks)
  • ACE/ace/OS_NS_Thread.h (1 hunks)
  • ACE/ace/OS_NS_Thread.inl (2 hunks)
  • ACE/ace/Sock_Connect.cpp (1 hunks)
  • ACE/ace/Stack_Trace.cpp (1 hunks)
  • ACE/ace/Thread.cpp (2 hunks)
  • ACE/ace/Thread.h (3 hunks)
  • ACE/ace/Thread.inl (1 hunks)
  • ACE/ace/Thread_Manager.cpp (4 hunks)
  • ACE/ace/Thread_Manager.h (4 hunks)
  • ACE/ace/config-integrity-common.h (1 hunks)
  • TAO/tao/GIOP_Message_Base.cpp (0 hunks)
  • TAO/tao/ORB_Core.cpp (1 hunks)
  • TAO/tao/Stub.inl (1 hunks)
  • TAO/tao/Thread_Per_Connection_Handler.cpp (2 hunks)
  • TAO/tao/Thread_Per_Connection_Handler.h (1 hunks)
  • TAO/tao/Transport.cpp (4 hunks)
💤 Files with no reviewable changes (1)
  • TAO/tao/GIOP_Message_Base.cpp
🧰 Additional context used
🧬 Code Graph Analysis (1)
TAO/tao/Thread_Per_Connection_Handler.cpp (2)
TAO/tao/Thread_Per_Connection_Handler.h (1)
  • activate_ch (49-49)
ACE/ace/OS_NS_stdlib.h (1)
  • itoa (201-201)
🪛 Cppcheck (2.10-2)
TAO/tao/Thread_Per_Connection_Handler.cpp

[error] 33-33: There is an unknown macro here somewhere. Configuration is required. If ACE_TEXT is a macro then please configure it.

(unknownMacro)

⏰ Context from checks skipped due to timeout of 90000ms (21)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: ubuntu-24.04 clang++-16
  • GitHub Check: ubuntu-24.04 g++-10 ACE for TAO
  • GitHub Check: ubuntu-24.04 g++-10 CORBA/e compact
  • GitHub Check: ubuntu-24.04 g++-13
  • GitHub Check: ubuntu-24.04 g++-14
  • GitHub Check: ubuntu-24.04 g++-11
  • GitHub Check: VS2022Release64
  • GitHub Check: VS2019Release64
  • GitHub Check: VS2019Release32
  • GitHub Check: VS2022WChar
  • GitHub Check: VS2019Debug64Cxx17
  • GitHub Check: VS2019Debug64Cxx20
  • GitHub Check: VS2022Debug64
  • GitHub Check: VS2019Debug64
  • GitHub Check: VS2019WChar
  • GitHub Check: VS2019Debug32
  • GitHub Check: MINGW64-gcc
  • GitHub Check: windows-2019 vs2019
  • GitHub Check: macos-13-C++
  • GitHub Check: macos-14-C++
🔇 Additional comments (31)
TAO/tao/Stub.inl (1)

42-42: Non-functional documentation tweak: Clarify comment style

The update refines the comment from the more emphatic “forward queue (??!)” to a concise “forward queue (?)”, improving readability without altering behavior.

ACE/ace/config-integrity-common.h (1)

38-38: Adds necessary ioctl argument type for INTEGRITY platform

This defines the type for the second argument of ioctl system calls as unsigned long, ensuring consistent type usage for ioctl commands across the INTEGRITY platform.

ACE/ace/Sock_Connect.cpp (2)

844-845: Uses the proper platform-specific ioctl type for SIOCGLIFNUM command

The change from int to ACE_IOCTL_TYPE_ARG2 ensures type consistency with the INTEGRITY platform definition and prevents potential type-related issues.


847-848: Uses the proper platform-specific ioctl type for SIOCGIFNUM command

Similar to the change above, this ensures type consistency for the SIOCGIFNUM command, using the newly defined ACE_IOCTL_TYPE_ARG2 macro rather than a hard-coded type.

TAO/tao/Thread_Per_Connection_Handler.h (1)

49-49:

Details

✅ Verification successful

New method for activating connection handler with named threads

This method enhances the thread-per-connection handler to support thread names, which corresponds to the other changes for thread naming support on Windows and INTEGRITY platforms.


🏁 Script executed:

#!/bin/bash
# Find implementation of this method to verify it correctly creates thread names
rg -A 15 "activate_ch.*long flags, int n_threads" --type cpp

Length of output: 1078


🏁 Script executed:

#!/bin/bash
# Locate the implementation of activate_ch to verify thread naming logic
rg -n "Thread_Per_Connection_Handler::activate_ch" -C15 --type cpp

Length of output: 2335


🏁 Script executed:

#!/bin/bash
# Display the full implementation of activate_ch to verify thread naming logic
sed -n '27,200p' TAO/tao/Thread_Per_Connection_Handler.cpp

Length of output: 1744


Thread naming correctly implemented in activate_ch

The activate_ch method now constructs per-thread names ("TAO_Thread_Per_Connection_Handler <i>") and passes them via the thread_names array to ACE_Task_Base::activate, matching the naming support added for Windows and INTEGRITY platforms. Excellent addition!

ACE/ace/Thread.inl (1)

79-79: Improved pointer spacing consistency

The whitespace adjustment in the pointer declaration (const char **thr_name instead of const char** thr_name) aligns with similar formatting standardization across multiple thread-related files in this PR.

ACE/ace/Thread.cpp (1)

20-20: Standardized pointer spacing in function signatures.

The changes apply a consistent pointer declaration style with space between the type and asterisk (const char * instead of const char*), aligning with the project's coding conventions for thread name parameters.

Also applies to: 56-56

ACE/ace/Thread.h (1)

91-91: Standardized pointer spacing in thread name parameters.

Consistently applied pointer declaration style with space between type and asterisk in thread name parameters, matching the formatting changes across related files.

Also applies to: 115-115, 145-145

ACE/ace/Stack_Trace.cpp (1)

51-52: Improved platform-specific function compilation for determine_starting_frame.

Added conditional compilation directives to ensure the determine_starting_frame helper function is only compiled on supported platforms where it's needed. This is a good practice for cross-platform code as it helps avoid potential compilation issues on unsupported platforms.

Also applies to: 58-58

ACE/ace/OS_NS_Thread.h (1)

1643-1643: Standardized pointer spacing in thread creation function.

Updated the spacing in thr_name parameter declaration to match the consistent pointer style used throughout related files. This function is crucial for the PR's thread naming support implementation.

TAO/tao/Thread_Per_Connection_Handler.cpp (2)

7-7: Required new inclusion for thread name management

The added include for the Vector template is necessary to support the new thread naming functionality. This allows for proper container management of thread names.


33-34:

Details

✅ Verification successful

Possible macro configuration needed for ACE_TEXT

The static analysis tool indicates that there is an unknown macro ACE_TEXT being used here. While this is likely configured elsewhere in the codebase, it's worth verifying that this macro is properly defined in all build environments.


🏁 Script executed:

#!/bin/bash
# Check if ACE_TEXT is defined in ACE headers
grep -r "^#define ACE_TEXT" --include="*.h" .

Length of output: 10321


ACE_TEXT macro is properly defined in ACE headers

We located multiple #define ACE_TEXT entries in ACE/ace/ace_wchar.h, so the ACE_TEXT macro is already configured and available in all build environments. No further action is needed.

🧰 Tools
🪛 Cppcheck (2.10-2)

[error] 33-33: There is an unknown macro here somewhere. Configuration is required. If ACE_TEXT is a macro then please configure it.

(unknownMacro)

ACE/ace/OS_NS_Thread.cpp (5)

3458-3458: Consistent pointer spacing in parameter declaration

The parameter declaration has been updated to maintain consistent pointer spacing style with const char **thr_name. This change is a good practice for code readability and consistency.


3945-3946: Added thread naming support for VxWorks

Thread naming has been added for VxWorks by passing the thread name to taskSpawn. This is a good improvement that makes thread identification consistent across platforms.


4032-4034: Added thread naming support for INTEGRITY platform

Thread naming support for INTEGRITY has been added in the SetupTask call with proper null pointer handling. This is a valuable improvement that enhances cross-platform debugging capabilities.


4042-4044: Added thread naming support for non-178B INTEGRITY

Thread naming support is also added for standard INTEGRITY (non-178B) in the CommonCreateTask call. This ensures consistent thread naming support across all INTEGRITY variants.


3458-4096: Comprehensive thread naming implementation

The changes add thread naming support across multiple platforms (Windows, VxWorks, INTEGRITY) in a consistent manner. This is an excellent improvement that will significantly enhance debugging and monitoring capabilities.

The implementation properly handles:

  1. Platform-specific APIs for thread naming
  2. Null pointer checks to avoid crashes
  3. Consistent parameter naming across function declarations and implementations

This is a well-designed cross-platform enhancement.

ACE/ace/OS_NS_Thread.inl (2)

2382-2385: Added explicit fallback case for unsupported platforms

The code now properly handles platforms without Windows threads or sigwait by marking the signal set parameter as unused and returning -1 to indicate the unsupported operation.


2849-2857: Improved conditional check for thread name function

The check now properly requires both ACE_HAS_THREADS and ACE_HAS_VXTHREADS to be defined for the function to proceed, aligning with the broader thread naming enhancements in this PR. This tightens the condition to ensure the function is only used on platforms that fully support it.

ACE/ace/Thread_Manager.cpp (4)

580-580: Consistent pointer spacing in parameter declaration

Updated formatting to use consistent pointer spacing for const char **thr_name parameter, which aligns with the thread naming improvements across the codebase.


695-695: Consistent pointer spacing in parameter declaration

Updated formatting to use consistent pointer spacing for const char **thr_name parameter, maintaining consistent style across thread-related interfaces.


736-736: Consistent pointer spacing in array parameter declaration

Updated formatting to use consistent pointer spacing for const char *thr_name[] parameter, which improves readability and maintains consistent style with other thread name parameters.


779-779: Consistent pointer spacing in array parameter declaration

Updated formatting to use consistent pointer spacing for const char *thr_name[] parameter, which maintains consistent style with other thread name parameters throughout the thread management interfaces.

ACE/ace/Thread_Manager.h (4)

533-533: Consistent pointer spacing for thr_name in spawn
Updated the spawn signature to use const char **thr_name, aligning pointer spacing with other thread‐creation APIs. This is purely stylistic and has no behavioral impact.


610-610: Consistent pointer spacing for thr_name in spawn_n (array overload)
Standardized the parameter to const char *thr_name[], matching the array‐style overload and ensuring uniform formatting across methods. No logic change.


693-693: Consistent pointer spacing for thr_name in second spawn_n overload
Adjusted the array parameter to const char *thr_name[] to mirror the other spawn_n overload and maintain stylistic consistency.


1118-1118: Consistent pointer spacing for thr_name in internal spawn_i
Changed the internal spawn_i signature to const char **thr_name for consistency with the public spawn API. Purely formatting.

TAO/tao/ORB_Core.cpp (1)

3138-3142: Formatting-only: streamlined switch in get_transport_queueing_strategy

The refactored switch for TAO_ORB_Core::get_transport_queueing_strategy removes unnecessary braces around the switch and its case blocks, improving readability without altering any return logic. No behavioral changes detected.

TAO/tao/Transport.cpp (3)

2468-2477: Removed unreachable break in CloseConnection case

In the case GIOP::CloseConnection branch, the return -1; now suffices to exit the function, so the redundant break; has been removed. This change is purely cleanup—no functional impact.


2482-2492: Streamlined Request case formatting

The case GIOP::Request/LocateRequest block has been flattened by removing extra braces and positioning the break; directly after the conditional return. This refactoring preserves existing behavior while reducing visual clutter.


2493-2501: Scoped Reply case with explicit braces

The case GIOP::Reply/LocateReply block now encloses its multi-statement body in braces, making the scope of TAO_Pluggable_Reply_Params params clear. This is a no-op refactor for clarity and does not change functionality.

iguessthislldo
iguessthislldo previously approved these changes Apr 24, 2025
Comment thread ACE/ace/OS_NS_Thread.inl
@mitza-oci mitza-oci merged commit e3b027b into DOCGroup:master Apr 28, 2025
49 of 50 checks passed
@mitza-oci mitza-oci deleted the thread-names branch April 28, 2025 13:13
mitza-oci added a commit to mitza-oci/ACE_TAO that referenced this pull request Apr 30, 2025
Support thread names on Windows

(cherry picked from commit e3b027b)

# Conflicts:
#	ACE/NEWS
#	ACE/ace/OS_NS_Thread.cpp
#	ACE/ace/OS_NS_Thread.inl
#	ACE/ace/Sock_Connect.cpp
#	ACE/ace/config-integrity-common.h
#	TAO/NEWS
#	TAO/tao/ORB_Core.cpp
#	TAO/tao/Thread_Per_Connection_Handler.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants