Skip to content

Commit

Permalink
[v1.15.x] fabtests/common: Use dummy ft_pin_core on macOS
Browse files Browse the repository at this point in the history
sched_setaffinity is only available on Linux.

Signed-off-by: Ken Raffenetti <raffenet@mcs.anl.gov>
(cherry picked from commit 3425fa7)
  • Loading branch information
raffenet authored and j-xiong committed Nov 16, 2023
1 parent a29b458 commit ae586ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fabtests/common/shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -3623,6 +3623,7 @@ void ft_free_string_array(char **s)
free(s);
}

#ifndef __APPLE__
static const char *nexttoken(const char *str, int chr)
{
if (str)
Expand Down Expand Up @@ -3676,6 +3677,12 @@ static int ft_pin_core(const char *core_list)

return sched_setaffinity(0, sizeof(mask), &mask);
}
#else
static int ft_pin_core(const char *core_list)
{
return EXIT_FAILURE;
}
#endif

static int ft_parse_pin_core_opt(char *optarg)
{
Expand Down

0 comments on commit ae586ed

Please sign in to comment.