[libc-commits] [PATCH] D147985: [LIBC] Implement `sched_yield()`
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Apr 11 22:30:25 PDT 2023
sivachandra added inline comments.
================
Comment at: libc/spec/gnu_ext.td:52
>,
+ FunctionSpec<
+ "sched_yield",
----------------
goldstein.w.n wrote:
> @michaelrj are you sure this is the right place for `sched_yield`. Seems to be part of POSIX specification:
> https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sched.h.html
You are correct - this should be `spec/posix.td`.
================
Comment at: libc/test/src/sched/yield_test.cpp:9
+
+#include "src/__support/OSUtil/syscall.h"
+#include "src/errno/libc_errno.h"
----------------
goldstein.w.n wrote:
> michaelrj wrote:
> > Nit: I'm not sure you need to include syscall here.
> Fixed. 1 more unrelated question if you have the time.
>
> I'm working on adding support for proper attr handling in `pthread_create`, but am finding normal libc tests / build doesn't include pthread (on linux).
>
> Any idea for the extra steps to build/test pthread?
> I'm working on adding support for proper attr handling in `pthread_create`, but am finding normal libc tests / build doesn't include pthread (on linux).
>
> Any idea for the extra steps to build/test pthread?
Depends on what you mean by "normal libc tests". If you are running `check-libc` on linux, it should already be including the pthread tests. But, you can run pthread tests by running `libc-integration-tests` or use a more focused target `libc-pthread-integration-tests`. The tests live here: https://github.com/llvm/llvm-project/tree/main/libc/test/integration/src/pthread
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147985/new/
https://reviews.llvm.org/D147985
More information about the libc-commits
mailing list