[libc-commits] [libc] [libc][NFC] Remove all trailing spaces from libc (PR #82831)
via libc-commits
libc-commits at lists.llvm.org
Fri Feb 23 13:03:09 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Joseph Huber (jhuber6)
<details>
<summary>Changes</summary>
Summary:
There are a lot of random training spaces on various lines. This patch
just got rid of all of them with `sed 's/\ \+$//g'.
---
Patch is 63.06 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/82831.diff
52 Files Affected:
- (modified) libc/AOR_v20.02/string/arm/memchr.S (+2-2)
- (modified) libc/CMakeLists.txt (+1-1)
- (modified) libc/benchmarks/automemcpy/README.md (+2-2)
- (modified) libc/cmake/modules/CheckCompilerFeatures.cmake (+1-1)
- (modified) libc/cmake/modules/LLVMLibCCompileOptionRules.cmake (+1-1)
- (modified) libc/cmake/modules/LLVMLibCLibraryRules.cmake (+4-4)
- (modified) libc/cmake/modules/LLVMLibCObjectRules.cmake (+1-1)
- (modified) libc/cmake/modules/LLVMLibCTestRules.cmake (+7-7)
- (modified) libc/config/darwin/x86_64/entrypoints.txt (+1-1)
- (modified) libc/config/linux/x86_64/exclude.txt (+2-2)
- (modified) libc/config/windows/entrypoints.txt (+1-1)
- (modified) libc/docs/contributing.rst (+1-1)
- (modified) libc/docs/date_and_time.rst (+3-3)
- (modified) libc/docs/dev/clang_tidy_checks.rst (+1-1)
- (modified) libc/docs/dev/config_options.rst (+1-1)
- (modified) libc/docs/dev/printf_behavior.rst (+2-2)
- (modified) libc/docs/full_cross_build.rst (+1-1)
- (modified) libc/docs/gpu/motivation.rst (+15-15)
- (modified) libc/docs/gpu/rpc.rst (+102-102)
- (modified) libc/docs/gpu/testing.rst (+2-2)
- (modified) libc/docs/gpu/using.rst (+9-9)
- (modified) libc/docs/libc_search.rst (+3-3)
- (modified) libc/docs/math/index.rst (+3-3)
- (modified) libc/docs/math/log.rst (+3-3)
- (modified) libc/docs/porting.rst (+1-1)
- (modified) libc/docs/stdio.rst (+1-1)
- (modified) libc/docs/strings.rst (+7-7)
- (modified) libc/include/fcntl.h.def (+1-1)
- (modified) libc/include/sched.h.def (+1-1)
- (modified) libc/include/spawn.h.def (+1-1)
- (modified) libc/spec/bsd_ext.td (+1-1)
- (modified) libc/spec/gnu_ext.td (+5-5)
- (modified) libc/spec/llvm_libc_ext.td (+1-1)
- (modified) libc/spec/posix.td (+2-2)
- (modified) libc/src/__support/HashTable/CMakeLists.txt (+1-1)
- (modified) libc/src/math/generic/CMakeLists.txt (+1-1)
- (modified) libc/src/search/hsearch/CMakeLists.txt (+1-1)
- (modified) libc/src/stdio/printf_core/CMakeLists.txt (+1-1)
- (modified) libc/src/stdio/scanf_core/CMakeLists.txt (+1-1)
- (modified) libc/src/stdlib/CMakeLists.txt (+3-3)
- (modified) libc/src/wchar/CMakeLists.txt (+1-1)
- (modified) libc/startup/linux/CMakeLists.txt (+3-3)
- (modified) libc/test/integration/scudo/CMakeLists.txt (+1-1)
- (modified) libc/test/src/__support/CMakeLists.txt (+1-1)
- (modified) libc/test/src/fenv/CMakeLists.txt (+1-1)
- (modified) libc/test/src/math/differential_testing/CMakeLists.txt (+1-1)
- (modified) libc/test/src/math/smoke/CMakeLists.txt (+1-1)
- (modified) libc/test/utils/UnitTest/CMakeLists.txt (+2-2)
- (modified) libc/utils/MPFRWrapper/CMakeLists.txt (+4-4)
- (modified) libc/utils/gpu/server/CMakeLists.txt (+1-1)
- (modified) libc/utils/mathtools/GenerateHPDConstants.py (+12-12)
- (modified) libc/utils/mathtools/ryu_tablegen.py (+1-1)
``````````diff
diff --git a/libc/AOR_v20.02/string/arm/memchr.S b/libc/AOR_v20.02/string/arm/memchr.S
index a9bba052fb7eee..38aaebd51f7d97 100644
--- a/libc/AOR_v20.02/string/arm/memchr.S
+++ b/libc/AOR_v20.02/string/arm/memchr.S
@@ -49,7 +49,7 @@ __memchr_arm:
and r1,r1,#0xff @ Don't think we can trust the caller to actually pass a char
cmp r2,#16 @ If it's short don't bother with anything clever
- blt 20f
+ blt 20f
tst r0, #7 @ If it's already aligned skip the next bit
beq 10f
@@ -87,7 +87,7 @@ __memchr_arm:
pop {r4,r5,r6,r7}
and r1,r1,#0xff @ Get r1 back to a single character from the expansion above
and r2,r2,#7 @ Leave the count remaining as the number after the double words have been done
-
+
20:
cbz r2, 40f @ 0 length or hit the end already then not found
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 6a57fcec26e473..75fcc91757b807 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -162,7 +162,7 @@ elseif(LIBC_CMAKE_VERBOSE_LOGGING)
message(STATUS "Path for config files is: ${LIBC_CONFIG_PATH}")
endif()
-# option(LIBC_ENABLE_WIDE_CHARACTERS
+# option(LIBC_ENABLE_WIDE_CHARACTERS
# "Whether to enable wide character functions on supported platforms. This may
# also set flags to enable or disable wide character support within other
# functions (e.g. printf)." ON)
diff --git a/libc/benchmarks/automemcpy/README.md b/libc/benchmarks/automemcpy/README.md
index 88d0b7ece9b9f8..8583368993ef06 100644
--- a/libc/benchmarks/automemcpy/README.md
+++ b/libc/benchmarks/automemcpy/README.md
@@ -17,7 +17,7 @@ git clone https://github.com/Z3Prover/z3.git
python scripts/mk_make.py --prefix=<Z3_INSTALL_DIR>
cd build
make -j
-make install
+make install
```
## Configuration
@@ -68,7 +68,7 @@ Make sure to save the results of the benchmark as a json file.
By default, each function is benchmarked for at least one second, here we lower it to 200ms.
- `--benchmark_filter="BM_Memset|BM_Bzero"`
-
+
By default, all functions are benchmarked, here we restrict them to `memset` and `bzero`.
Other options might be useful, use `--help` for more information.
diff --git a/libc/cmake/modules/CheckCompilerFeatures.cmake b/libc/cmake/modules/CheckCompilerFeatures.cmake
index 9789d72f99dc4c..c3f50df1dda53c 100644
--- a/libc/cmake/modules/CheckCompilerFeatures.cmake
+++ b/libc/cmake/modules/CheckCompilerFeatures.cmake
@@ -57,7 +57,7 @@ foreach(feature IN LISTS ALL_COMPILER_FEATURES)
if(${feature} STREQUAL "float128")
set(LIBC_COMPILER_HAS_FLOAT128 TRUE)
elseif(${feature} STREQUAL "fixed_point")
- set(LIBC_COMPILER_HAS_FIXED_POINT TRUE)
+ set(LIBC_COMPILER_HAS_FIXED_POINT TRUE)
endif()
endif()
endforeach()
diff --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index 408e25b3469c0a..c7ccd392354cb8 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -6,7 +6,7 @@ function(_get_compile_options_from_flags output_var)
endif()
check_flag(ADD_SSE4_2_FLAG ${ROUND_OPT_FLAG} ${flags})
check_flag(ADD_EXPLICIT_SIMD_OPT_FLAG ${EXPLICIT_SIMD_OPT_FLAG} ${flags})
-
+
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
if(ADD_FMA_FLAG)
if(LIBC_TARGET_ARCHITECTURE_IS_X86)
diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index 9fba51f8ee7f49..c376faafcf2d74 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -125,7 +125,7 @@ function(add_gpu_entrypoint_library target_name base_target_name)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/binary/${name}.gpubin"
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/binary
COMMAND ${LIBC_CLANG_OFFLOAD_PACKAGER}
- "${prefix},file=$<JOIN:${object},,file=>" -o
+ "${prefix},file=$<JOIN:${object},,file=>" -o
${CMAKE_CURRENT_BINARY_DIR}/binary/${name}.gpubin
DEPENDS ${dep} ${base_target_name}
COMMENT "Packaging LLVM offloading binary for '${object}'"
@@ -142,7 +142,7 @@ function(add_gpu_entrypoint_library target_name base_target_name)
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/stubs/${name}.cpp
DEPENDS ${dep} ${dep}.__gpubin__ ${base_target_name}
)
- add_custom_target(${dep}.__stub__
+ add_custom_target(${dep}.__stub__
DEPENDS ${dep}.__gpubin__ "${CMAKE_CURRENT_BINARY_DIR}/stubs/${name}.cpp")
add_library(${dep}.__fatbin__
@@ -151,9 +151,9 @@ function(add_gpu_entrypoint_library target_name base_target_name)
)
# This is always compiled for the LLVM host triple instead of the native GPU
- # triple that is used by default in the build.
+ # triple that is used by default in the build.
target_compile_options(${dep}.__fatbin__ BEFORE PRIVATE -nostdlib)
- target_compile_options(${dep}.__fatbin__ PRIVATE
+ target_compile_options(${dep}.__fatbin__ PRIVATE
--target=${LLVM_HOST_TRIPLE}
"SHELL:-Xclang -fembed-offload-object=${CMAKE_CURRENT_BINARY_DIR}/binary/${name}.gpubin")
add_dependencies(${dep}.__fatbin__
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 78536f4eec55a4..8a84c82206ba6c 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -284,7 +284,7 @@ function(create_entrypoint_object fq_target_name)
# The NVPTX target cannot use LTO for the internal targets used for testing.
if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
- target_compile_options(${internal_target_name} PRIVATE
+ target_compile_options(${internal_target_name} PRIVATE
-fno-lto -march=${LIBC_GPU_TARGET_ARCHITECTURE})
endif()
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 9d1e426a5b7b31..76ce6754bd7339 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -318,8 +318,8 @@ function(add_libc_fuzzer target_name)
target_include_directories(${fq_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
target_include_directories(${fq_target_name} PRIVATE ${LIBC_SOURCE_DIR})
- target_link_libraries(${fq_target_name} PRIVATE
- ${link_object_files}
+ target_link_libraries(${fq_target_name} PRIVATE
+ ${link_object_files}
${LIBC_FUZZER_LINK_LIBRARIES}
)
@@ -352,7 +352,7 @@ endif()
# system libc are linked in to the final executable. The final exe is fully
# statically linked. The libc that the final exe links to consists of only
# the object files of the DEPENDS targets.
-#
+#
# Usage:
# add_integration_test(
# <target name>
@@ -462,7 +462,7 @@ function(add_integration_test test_name)
target_compile_options(${fq_build_target_name} PRIVATE ${compile_options})
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
- target_link_options(${fq_build_target_name} PRIVATE
+ target_link_options(${fq_build_target_name} PRIVATE
${LIBC_COMPILE_OPTIONS_DEFAULT}
-mcpu=${LIBC_GPU_TARGET_ARCHITECTURE} -flto
"-Wl,-mllvm,-amdgpu-lower-global-ctor-dtor=0" -nostdlib -static
@@ -470,7 +470,7 @@ function(add_integration_test test_name)
elseif(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
# We need to use the internal object versions for NVPTX.
set(internal_suffix ".__internal__")
- target_link_options(${fq_build_target_name} PRIVATE
+ target_link_options(${fq_build_target_name} PRIVATE
${LIBC_COMPILE_OPTIONS_DEFAULT}
"-Wl,--suppress-stack-size-warning"
-march=${LIBC_GPU_TARGET_ARCHITECTURE} -nostdlib -static
@@ -645,7 +645,7 @@ function(add_libc_hermetic_test test_name)
endforeach()
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
- target_link_options(${fq_build_target_name} PRIVATE
+ target_link_options(${fq_build_target_name} PRIVATE
${LIBC_COMPILE_OPTIONS_DEFAULT}
-mcpu=${LIBC_GPU_TARGET_ARCHITECTURE} -flto
"-Wl,-mllvm,-amdgpu-lower-global-ctor-dtor=0" -nostdlib -static
@@ -653,7 +653,7 @@ function(add_libc_hermetic_test test_name)
elseif(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
# We need to use the internal object versions for NVPTX.
set(internal_suffix ".__internal__")
- target_link_options(${fq_build_target_name} PRIVATE
+ target_link_options(${fq_build_target_name} PRIVATE
${LIBC_COMPILE_OPTIONS_DEFAULT}
"-Wl,--suppress-stack-size-warning"
-march=${LIBC_GPU_TARGET_ARCHITECTURE} -nostdlib -static
diff --git a/libc/config/darwin/x86_64/entrypoints.txt b/libc/config/darwin/x86_64/entrypoints.txt
index 91493cb77b1d86..5a1a6a15ef30c0 100644
--- a/libc/config/darwin/x86_64/entrypoints.txt
+++ b/libc/config/darwin/x86_64/entrypoints.txt
@@ -16,7 +16,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.ctype.toascii
libc.src.ctype.tolower
libc.src.ctype.toupper
-
+
# string.h entrypoints
libc.src.string.bcmp
libc.src.string.bzero
diff --git a/libc/config/linux/x86_64/exclude.txt b/libc/config/linux/x86_64/exclude.txt
index efe3eb9f4671b7..2c218b753b176e 100644
--- a/libc/config/linux/x86_64/exclude.txt
+++ b/libc/config/linux/x86_64/exclude.txt
@@ -9,12 +9,12 @@ try_compile(
)
if(NOT has_sys_random)
- list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
+ list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
libc.src.sys.stat.stat
)
# If we're doing a fullbuild we provide the random header ourselves.
if(NOT LLVM_LIBC_FULL_BUILD)
- list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
+ list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
libc.src.sys.random.getrandom
)
endif()
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index 5c3a2e287b9529..1c9ed7bbcfed69 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -116,7 +116,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.acoshf
libc.src.math.asinf
libc.src.math.asinhf
- libc.src.math.atanf
+ libc.src.math.atanf
libc.src.math.atanhf
libc.src.math.copysign
libc.src.math.copysignf
diff --git a/libc/docs/contributing.rst b/libc/docs/contributing.rst
index 50151348f88057..b92575ed4108f5 100644
--- a/libc/docs/contributing.rst
+++ b/libc/docs/contributing.rst
@@ -29,7 +29,7 @@ a list of open projects that one can start with:
#. One is about adding CMake facilities to optionally link the libc's overlay
static archive (see :ref:`overlay_mode`) with other LLVM tools/executables.
#. The other is about putting plumbing in place to release the overlay static
- archive (see :ref:`overlay_mode`) as part of the LLVM binary releases.
+ archive (see :ref:`overlay_mode`) as part of the LLVM binary releases.
#. **Implement Linux syscall wrappers** - A large portion of the POSIX API can
be implemented as syscall wrappers on Linux. A good number have already been
diff --git a/libc/docs/date_and_time.rst b/libc/docs/date_and_time.rst
index 8d25ea6e946135..303dd3fa12df2a 100644
--- a/libc/docs/date_and_time.rst
+++ b/libc/docs/date_and_time.rst
@@ -26,7 +26,7 @@ Implementation Status
* To check date and time functions enabled for Windows:
- - `windows-x86_64 <https://github.com/llvm/llvm-project/tree/main/libc/config/windows/entrypoints.txt>`_
+ - `windows-x86_64 <https://github.com/llvm/llvm-project/tree/main/libc/config/windows/entrypoints.txt>`_
- windows-aarch64 - to be added
@@ -38,11 +38,11 @@ Implementation Status
* To check date and time functions enabled for GPU:
- - `gpu-entrypoints <https://github.com/llvm/llvm-project/tree/main/libc/config/gpu/entrypoints.txt>`_
+ - `gpu-entrypoints <https://github.com/llvm/llvm-project/tree/main/libc/config/gpu/entrypoints.txt>`_
* To check date and time functions enabled for embedded system:
- - `barebone-aarch32 <https://github.com/llvm/llvm-project/tree/main/libc/config/baremetal/arm/entrypoints.txt>`_
+ - `barebone-aarch32 <https://github.com/llvm/llvm-project/tree/main/libc/config/baremetal/arm/entrypoints.txt>`_
- barebone-riscv32 - to be added
diff --git a/libc/docs/dev/clang_tidy_checks.rst b/libc/docs/dev/clang_tidy_checks.rst
index 8ad806993a043c..3feb5375ef113c 100644
--- a/libc/docs/dev/clang_tidy_checks.rst
+++ b/libc/docs/dev/clang_tidy_checks.rst
@@ -75,7 +75,7 @@ a public header with non-namespaced functions like ``string.h`` is included.
This check ensures any function call resolves to a function within the
LIBC_NAMESPACE namespace.
-There are exceptions for the following functions:
+There are exceptions for the following functions:
``__errno_location`` so that ``errno`` can be set;
``malloc``, ``calloc``, ``realloc``, ``aligned_alloc``, and ``free`` since they
are always external and can be intercepted.
diff --git a/libc/docs/dev/config_options.rst b/libc/docs/dev/config_options.rst
index db70342ed74ce9..47f4baef8ebf1a 100644
--- a/libc/docs/dev/config_options.rst
+++ b/libc/docs/dev/config_options.rst
@@ -66,7 +66,7 @@ example, the option-dictionary is:
{
"LIBC_CONF_PRINTF_DISABLE_FLOAT": {
"value": false,
- "doc":
+ "doc":
},
...
}
diff --git a/libc/docs/dev/printf_behavior.rst b/libc/docs/dev/printf_behavior.rst
index bc60aa43ee2b6b..7128c738d19248 100644
--- a/libc/docs/dev/printf_behavior.rst
+++ b/libc/docs/dev/printf_behavior.rst
@@ -2,7 +2,7 @@
Printf Behavior Under All Conditions
====================================
-Introduction:
+Introduction:
=============
On the "defining undefined behavior" page, I said you should write down your
decisions regarding undefined behavior in your functions. This is that document
@@ -102,7 +102,7 @@ behavior.
LIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE
-------------------------------------------------
When set, the float to string decimal conversion algorithm will use a larger
-table to accelerate long double conversions. This larger table is around 5MB of
+table to accelerate long double conversions. This larger table is around 5MB of
size when compiled.
LIBC_COPT_FLOAT_TO_STR_USE_DYADIC_FLOAT
diff --git a/libc/docs/full_cross_build.rst b/libc/docs/full_cross_build.rst
index cb824730603ad1..f06464534f152d 100644
--- a/libc/docs/full_cross_build.rst
+++ b/libc/docs/full_cross_build.rst
@@ -87,7 +87,7 @@ After configuring the build with the above ``cmake`` command, one can build the
the libc for the target with the following command:
.. code-block:: sh
-
+
$> ninja libc libm
The above ``ninja`` command will build the libc static archives ``libc.a`` and
diff --git a/libc/docs/gpu/motivation.rst b/libc/docs/gpu/motivation.rst
index 171287c3f996f1..7e5336dbbe5de6 100644
--- a/libc/docs/gpu/motivation.rst
+++ b/libc/docs/gpu/motivation.rst
@@ -11,14 +11,14 @@ Motivation and Limitations
Motivation
==========
-This project aims to provide a large subset of the C standard library to users
-of GPU accelerators. We deliberately choose to only implement a subset of the C
-library as some features are not expressly useful or easily implemented on the
-GPU. This will be discussed further in `Limitations <libc_gpu_limitations>`_.
-The main motivation behind this project is to provide the well understood C
+This project aims to provide a large subset of the C standard library to users
+of GPU accelerators. We deliberately choose to only implement a subset of the C
+library as some features are not expressly useful or easily implemented on the
+GPU. This will be discussed further in `Limitations <libc_gpu_limitations>`_.
+The main motivation behind this project is to provide the well understood C
library as a firm base for GPU development.
-The main idea behind this project is that programming GPUs can be as
+The main idea behind this project is that programming GPUs can be as
straightforward as programming on CPUs. This project aims to validate the GPU as
a more general-purpose target. The implementations here will also enable more
complex implementations of other libraries on the GPU, such as ``libc++``.
@@ -31,10 +31,10 @@ toolchain. We also aim to provide these functions in a format compatible with
offloading in ``Clang`` so that we can treat the C library for the GPU as a
standard static library.
-A valuable use for providing C library features on the GPU is for testing. For
-this reason we build `tests on the GPU <libc_gpu_testing>`_ that can run a unit
-test as if it were being run on the CPU. This also helps users port applications
-that traditionally were run on the CPU. With this support, we can expand test
+A valuable use for providing C library features on the GPU is for testing. For
+this reason we build `tests on the GPU <libc_gpu_testing>`_ that can run a unit
+test as if it were being run on the CPU. This also helps users port applications
+that traditionally were run on the CPU. With this support, we can expand test
coverage for the GPU backend to the existing LLVM C library tests.
.. _libc_gpu_limitations:
@@ -43,9 +43,9 @@ Limitations
===========
We only implement a subset of the standard C library. The GPU does not
-currently support thread local variables in all cases, so variables like
-``errno`` are not provided. Furthermore, the GPU under the OpenCL execution
-model cannot safely provide a mutex interface. This means that features like
-file buffering are not implemented on the GPU. We can also not easily provide
-threading features on the GPU due to the execution model so these will be
+currently support thread local variables in all cases, so variables like
+``errno`` are not provided. Furthermore, the GPU under the OpenCL execution
+model cannot safely provide a mutex interface. This means that features like
+file buffering are not implemented on the GPU. We can also not easily provide
+threading features on the GPU due to the execution model so these will be
ignored, as will features like ``locale`` or ``time``.
diff --git a/libc/docs/gpu/rpc.rst b/libc/docs/gpu/rpc.rst
index fb738138568f6e..7b0b35af4da88c 100644
--- a/libc/docs/gpu/rpc.rst
+++ b/libc/docs/gpu/rpc.rst
@@ -11,62 +11,62 @@ Remote Procedure Calls
Remote Procedure Call Implementation
====================================
-Traditionally, the C library abstracts over several functions that interface
-with the platform's operating system through system calls. The GPU however does
+Traditionally, the C library abstracts over several functions that interface
+with the platform's operating system through system calls. The GPU however does
not provide an operating system that can handle target dependent operations.
-Instead, we implemented remote procedure calls to interface with the host's
+Instead, we implemented remote procedure calls to interface with the host's
operating system while executing on a GPU.
-We implemented remote procedure calls using unified virtual memory to create a
-shared communicate channel between the two processes. This memory is often
-pinned memory that can be accessed asynchronously and atomically by multiple
-processes simultaneously. This supports means that we can simply provide mutual
-exclusion on a shared better to swap work back and forth between the host system
-and the GPU. We can then use this to create a simple client-server protocol
+We implemented remote procedure calls using unified virtual memory to create a
+shared communicate channel between the two processes. This memory is often
+pinned memory that can be accessed asynchronously and atomically by multiple
+processes simultaneously. This supports means that we can simply provide mutual
+exclusion on a shared better to swap work back and forth between the host system
+and the GPU. We can then use this to create a simple client-server protocol
using this shared memory.
-This work treats the GPU as a client and the host as a server. The client
-initiates a communication while the server listens for them. In order to
-communicate between the host and the device, we simply maintain a buffer of
-memory and two mailboxes. One mailbox is write-only while the other is
-read-only. This exposes three primitive operations: using the buffer, giving
-away ownership, and waiting for ownership. This is implemented as a hal...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/82831
More information about the libc-commits
mailing list