Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
574020ed
Commit
574020ed
authored
9 years ago
by
vjpai
Browse files
Options
Downloads
Patches
Plain Diff
Forgot to put this in the Mac version
parent
ac1ac3ab
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/cpp/qps/limit_cores.cc
+3
-3
3 additions, 3 deletions
test/cpp/qps/limit_cores.cc
with
3 additions
and
3 deletions
test/cpp/qps/limit_cores.cc
+
3
−
3
View file @
574020ed
...
...
@@ -46,11 +46,11 @@ namespace testing {
#define _GNU_SOURCE
#endif
#include
<sched.h>
int
LimitCores
(
const
int
*
cores
,
int
cores_size
)
{
int
LimitCores
(
const
int
*
cores
,
int
cores_size
)
{
const
int
num_cores
=
gpr_cpu_num_cores
();
int
cores_set
=
0
;
cpu_set_t
*
cpup
=
CPU_ALLOC
(
num_cores
);
cpu_set_t
*
cpup
=
CPU_ALLOC
(
num_cores
);
GPR_ASSERT
(
cpup
);
const
size_t
size
=
CPU_ALLOC_SIZE
(
num_cores
);
CPU_ZERO_S
(
size
,
cpup
);
...
...
@@ -74,7 +74,7 @@ int LimitCores(const int *cores, int cores_size) {
}
#else
// LimitCores is not currently supported for non-Linux platforms
int
LimitCores
(
std
::
vector
<
int
>
core_vec
)
{
return
gpr_cpu_num_cores
();
}
int
LimitCores
(
const
int
*
,
int
)
{
return
gpr_cpu_num_cores
();
}
#endif
}
// namespace testing
}
// namespace grpc
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment