Skip to content

Commit

Permalink
Merge pull request #23 from grundlerchromium/rename_process_affinity
Browse files Browse the repository at this point in the history
netlib: processor_affinity conflicts in solaris
  • Loading branch information
kirbychris authored Jun 13, 2018
2 parents 859128b + 2315a69 commit bcb868b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/netlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ shutdown_control()
2004/12/13 */

void
bind_to_specific_processor(int processor_affinity, int use_cpu_map)
bind_to_specific_processor(int use_cpu_affinity, int use_cpu_map)
{

int mapped_affinity;
Expand All @@ -2281,10 +2281,10 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
a suitable CPU id even when the space is not contiguous and
starting from zero */
if (use_cpu_map) {
mapped_affinity = lib_cpu_map[processor_affinity];
mapped_affinity = lib_cpu_map[use_cpu_affinity];
}
else {
mapped_affinity = processor_affinity;
mapped_affinity = use_cpu_affinity;
}

#ifdef HAVE_MPCTL
Expand Down Expand Up @@ -2377,7 +2377,7 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
if ((mapped_affinity < 0) ||
(mapped_affinity > MAXIMUM_PROCESSORS)) {
fprintf(where,
"Invalid processor_affinity specified: %d\n", mapped_affinity); fflush(where);
"Invalid use_cpu_affinity specified: %d\n", mapped_affinity); fflush(where);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/netlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ extern double calc_thruput_omni(double units_received);
extern double calc_thruput_interval_omni(double units_received,double elapsed);
extern float calibrate_local_cpu(float local_cpu_rate);
extern float calibrate_remote_cpu();
extern void bind_to_specific_processor(int processor_affinity,int use_cpu_map);
extern void bind_to_specific_processor(int use_cpu_affinity,int use_cpu_map);
extern int set_nonblock (SOCKET sock);
extern char *find_egress_interface(struct sockaddr *source, struct sockaddr *dest);
extern char *find_interface_slot(char *interface_name);
Expand Down

0 comments on commit bcb868b

Please sign in to comment.