Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add os.cpu_count() support for VxWorks RTOS
  • Loading branch information
pxinwr committed Jul 30, 2020
commit 70b1229f50f3de059681ee120ad4324ff6fb0605
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add os.cpu_count() support for VxWorks RTOS.
Comment thread
pxinwr marked this conversation as resolved.
Outdated
2 changes: 2 additions & 0 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -12607,6 +12607,8 @@ os_cpu_count_impl(PyObject *module)
ncpu = mpctl(MPC_GETNUMSPUS, NULL, NULL);
#elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
ncpu = sysconf(_SC_NPROCESSORS_ONLN);
#elif defined(__VXWORKS__)
ncpu = __builtin_popcount(vxCpuEnabledGet());
Comment thread
pxinwr marked this conversation as resolved.
Outdated
#elif defined(__DragonFly__) || \
defined(__OpenBSD__) || \
defined(__FreeBSD__) || \
Expand Down