Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emscripten processor count #3667

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
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
6 changes: 4 additions & 2 deletions codec/common/src/WelsThreadLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
#include <sys/types.h>
#include <sys/param.h>
#include <unistd.h>
#ifndef __Fuchsia__
#ifdef __EMSCRIPTEN__
#include <emscripten/threading.h>
#elif !defined(__Fuchsia__)
#include <sys/sysctl.h>
#endif
#ifdef __APPLE__
Expand Down Expand Up @@ -508,7 +510,7 @@ WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo (WelsLogicalProcessInfo* p
#elif defined(__EMSCRIPTEN__)

// There is not yet a way to determine CPU count in emscripten JS environment.
pInfo->ProcessorCount = 1;
pInfo->ProcessorCount = emscripten_num_logical_cores();
return WELS_THREAD_ERROR_OK;

#elif defined(__Fuchsia__)
Expand Down