[Openmp-commits] [PATCH] D126408: [OPENMP] omp_get_proc_id uses sched_getcpu fallback on FreeBSD 13.1 and above

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue May 31 12:02:05 PDT 2022


jlpeyton added a comment.

Instead of a `KMP_OS_FREEBSD_SCHED` guard in `kmp_platform.h`, can you make a `KMP_HAVE_SCHED_GETCPU` guard defined as:

  #define KMP_HAVE_SCHED_GETCPU (KMP_OS_LINUX || (KMP_OS_FREEBSD && __FreeBSD_version >= 1301000))

And put this somewhere in `kmp_os.h` where some of the other features are defined (like attributes, `KMP_HAVE_MWAIT`, etc.). You can then use it in `ompt-general.cpp`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126408/new/

https://reviews.llvm.org/D126408



More information about the Openmp-commits mailing list