| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc] fix sysconf test for rv32 (#162685) | 9 个月前 | |
[libc] Mutex implementation for single-threaded baremetal (#145358) Part of https://github.com/llvm/llvm-project/issues/145349. Required to allow atexit to work. As part of HermeticTestUtils.cpp, there is a reference to atexit(), which eventually instantiates an instance of a Mutex. Instead of copying the implementation from libc/src/__support/threads/gpu/mutex.h, we allow platforms to select an implementation based on configurations, allowing the GPU and single-threaded baremetal platforms to share an implementation. This can be configured or overridden. Later, when the threading API is more complete, we can add an option to support multithreading (or set it as the default), but having single-threading (in tandem) is in line with other libraries for embedded devices. | 1 年前 | |
[libc][NFC] Add stdint.h proxy header to fix dependency issue with <stdint.h> includes. (#150303) https://github.com/llvm/llvm-project/issues/149993 | 1 年前 | |
[libc] Refactor AUXV handling with new auxv.h header library (#162326) Closes https://github.com/llvm/llvm-project/issues/153666 This patch introduces a new centralized AUXV (auxiliary vector) handling mechanism for LLVM libc on Linux, replacing the previous scattered implementation across multiple files. ## Key Changes: ### New Files: - **libc/src/__support/OSUtil/linux/auxv.h**: New header library providing a clean interface for AUXV access with: - auxv::Entry struct for AUXV entries (type and value) - auxv::Vector class with iterator support for traversing AUXV - auxv::get() function for retrieving specific AUXV values - Thread-safe initialization with fallback mechanisms (prctl and /proc/self/auxv) ### Modified Files: 1. **libc/src/__support/OSUtil/linux/CMakeLists.txt**: - Added auxv header library declaration with proper dependencies: - libc.hdr.fcntl_macros - libc.src.__support.OSUtil.osutil - libc.src.__support.common - libc.src.__support.CPP.optional - libc.src.__support.threads.callonce 2. **libc/config/linux/app.h**: - Removed AuxEntry struct (moved to auxv.h as auxv::Entry) - Removed auxv_ptr from AppProperties struct - Simplified application properties structure 3. **libc/src/sys/auxv/linux/getauxval.cpp**: - Completely refactored to use new auxv.h interface - Removed ~200 lines of complex initialization code - Simplified to just call auxv::get() function - Removed dependencies to external symbols (mman, prctl, fcntl, read, close, open) 4. **libc/src/sys/auxv/linux/CMakeLists.txt**: - Updated dependencies to use new auxv header library - Removed dependencies to external symbols (prctl, mman, fcntl, unistd, etc.) 5. **libc/startup/linux/do_start.cpp**: - Updated to use new auxv::Vector interface - Changed from pointer-based to iterator-based AUXV traversal - Updated field names (aux_entry->id → aux_entry.type, aux_entry->value → aux_entry.val) - Added call to auxv::Vector::initialize_unsafe() for early AUXV setup 6. **libc/startup/linux/CMakeLists.txt**: - Added dependency on libc.src.__support.OSUtil.linux.auxv | 9 个月前 | |
| 2 年前 | ||
| 2 年前 | ||
[libc] small fix for overlay mode build (#101724) | 1 年前 | |
[libc] Change LIBC_THREAD_LOCAL to be dependent on LIBC_THREAD_MODE (#151527) When single-threaded mode is selected, all instances of the keyword LIBC_THREAD_LOCAL are stubbed out, similar to how it currently works on the GPU. This allows baremetal builds to avoid using thread_local. However, libcxx uses shared headers, so we need to be careful there. Thankfully, there is already an option to disable multithreading in libcxx, so a flag is added such that single-threaded mode is propagated down to libc. | 11 个月前 | |
| 2 年前 | ||
| 2 年前 | ||
[libc][NFC] Strip all training whitespace and missing newlines (#124163) | 1 年前 | |
[libc] ensure tls dtors are called in main thread (#133641) This is a part of allocator patch since I want to make sure the TLS for allocators are correctly handled. TLS dtors are not invoked on exit previously. This departures from major libc implementations. This PR fixes the issue by aligning the behavior with bionic. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/bionic/exit.cpp I believe the finalization order is also consistent with glibc now: On main thread exiting: - pthread_key dtors are not called (unless exiting with pthread_exit) - __cxa based tls dtors are called - ::__cxa_atexit and ::atexit dtors are called - .fini dtors are called  | 11 个月前 | |
[libc] ensure tls dtors are called in main thread (#133641) This is a part of allocator patch since I want to make sure the TLS for allocators are correctly handled. TLS dtors are not invoked on exit previously. This departures from major libc implementations. This PR fixes the issue by aligning the behavior with bionic. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/bionic/exit.cpp I believe the finalization order is also consistent with glibc now: On main thread exiting: - pthread_key dtors are not called (unless exiting with pthread_exit) - __cxa based tls dtors are called - ::__cxa_atexit and ::atexit dtors are called - .fini dtors are called  | 11 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 11 个月前 |