GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada Performance Win

Ada: Make __gnat_copy_attribs non-blocking on windows

The Ada runtime's `__gnat_copy_attribs` function now uses non-blocking file attribute fetching on Windows.

On Windows, the Ada runtime function __gnat_copy_attribs now uses GetFileAttributesEx instead of GetFileAttributes to fetch file attributes. This change makes the operation non-blocking, potentially improving responsiveness in multi-threaded Ada applications that interact with the file system.

In Details

This commit modifies adaint.c to use GetFileAttributesEx instead of GetFileAttributes within the __gnat_copy_attribs function. This change is specific to the Windows platform and aims to avoid potential blocking behavior when fetching file attributes. __gnat_copy_attribs is part of the Ada runtime library.

For Context

This commit addresses a potential performance issue in Ada programs running on Windows. The function __gnat_copy_attribs, part of the Ada runtime, is responsible for retrieving file attributes (like creation date or size). The change replaces a potentially blocking call with a non-blocking equivalent, which can prevent the program from freezing or slowing down if the file system is busy.

Filed Under: adawindowsperformancenon-blocking