mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
libc: fix the stubs for pthread_{suspend,resume}_all_np
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, arm64, aarch64) (push) Waiting to run
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, arm64, aarch64) (push) Waiting to run
Noticed just a little too late, stub_null returns a `void *` but these
prototypes have no return value. As far as I know, all of our archs
will throw the return value in a caller-saved register and it'll simply
be ignored, but it's probably worth being more accurate.
Fixes: 83aafcdc88
("libc, libthr: coordinate stubs for [...]")
This commit is contained in:
parent
83aafcdc88
commit
3cc3d71efe
@ -50,6 +50,7 @@ struct pthread {
|
||||
static struct pthread main_thread;
|
||||
|
||||
static int stub_main(void);
|
||||
static void stub_void(void);
|
||||
static void *stub_null(void);
|
||||
static struct pthread *stub_self(void);
|
||||
static int stub_zero(void);
|
||||
@ -132,8 +133,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = {
|
||||
[PJT_GETTHREADID_NP] = {PJT_DUAL_ENTRY(stub_zero)},
|
||||
[PJT_ATTR_GET_NP] = {PJT_DUAL_ENTRY(stub_esrch)},
|
||||
[PJT_GETNAME_NP] = {PJT_DUAL_ENTRY(stub_getname_np)},
|
||||
[PJT_SUSPEND_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)},
|
||||
[PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)},
|
||||
[PJT_SUSPEND_ALL_NP] = {PJT_DUAL_ENTRY(stub_void)},
|
||||
[PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_void)},
|
||||
};
|
||||
|
||||
/*
|
||||
@ -302,6 +303,12 @@ stub_zero(void)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
stub_void(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void *
|
||||
stub_null(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user