Commit 88e4d953 authored by Jonathan Jenkins's avatar Jonathan Jenkins

const correct modelnet 'category' params

parent 1edef080
......@@ -27,7 +27,7 @@ struct model_net_method
* uses it) */
void (*mn_register)(tw_lptype *base_type);
tw_stime (*model_net_method_packet_event)(
char* category,
char const * category,
tw_lpid final_dest_lp,
uint64_t packet_size,
int is_pull,
......@@ -66,7 +66,7 @@ struct model_net_method
const char * annotation,
int ignore_annotations,
tw_lpid sender_gid);
void (*mn_collective_call)(char* category, int message_size, int remote_event_size, const void* remote_event, tw_lp* sender);
void (*mn_collective_call)(char const * category, int message_size, int remote_event_size, const void* remote_event, tw_lp* sender);
void (*mn_collective_call_rc)(int message_size, tw_lp* sender);
};
......
......@@ -121,10 +121,10 @@ int model_net_get_id(char *net_name);
/* This event does a collective operation call for model-net */
void model_net_event_collective(
int net_id,
char* category,
char const * category,
int message_size,
int remote_event_size,
const void* remote_event,
void const * remote_event,
tw_lp *sender);
/* reverse event of the collective operation call */
......@@ -175,14 +175,14 @@ void model_net_event_collective_rc(
// first argument becomes the network ID
void model_net_event(
int net_id,
char* category,
char const * category,
tw_lpid final_dest_lp,
uint64_t message_size,
tw_stime offset,
int remote_event_size,
const void* remote_event,
void const * remote_event,
int self_event_size,
const void* self_event,
void const * self_event,
tw_lp *sender);
/*
* See model_net_event for a general description.
......@@ -193,15 +193,15 @@ void model_net_event(
*/
void model_net_event_annotated(
int net_id,
const char * annotation,
char* category,
char const * annotation,
char const * category,
tw_lpid final_dest_lp,
uint64_t message_size,
tw_stime offset,
int remote_event_size,
const void* remote_event,
void const * remote_event,
int self_event_size,
const void* self_event,
void const * self_event,
tw_lp *sender);
/* model_net_find_local_device()
......@@ -246,22 +246,22 @@ void model_net_event_rc(
*/
void model_net_pull_event(
int net_id,
char *category,
char const *category,
tw_lpid final_dest_lp,
uint64_t message_size,
tw_stime offset,
int self_event_size,
const void *self_event,
void const *self_event,
tw_lp *sender);
void model_net_pull_event_annotated(
int net_id,
const char * annotation,
char *category,
char const * annotation,
char const *category,
tw_lpid final_dest_lp,
uint64_t message_size,
tw_stime offset,
int self_event_size,
const void *self_event,
void const *self_event,
tw_lp *sender);
void model_net_pull_event_rc(
int net_id,
......@@ -306,7 +306,7 @@ void model_net_write_stats(tw_lpid lpid, mn_stats* stat);
void model_net_print_stats(tw_lpid lpid, mn_stats mn_stats_array[]);
/* find model-net statistics */
mn_stats* model_net_find_stats(const char* category, mn_stats mn_stats_array[]);
mn_stats* model_net_find_stats(char const * category, mn_stats mn_stats_array[]);
#endif /* MODELNET_H */
/*
......
......@@ -864,7 +864,7 @@ terminal_init( terminal_state * s,
}
/* collective operation for the torus network */
void dragonfly_collective(char* category, int message_size, int remote_event_size, const void* remote_event, tw_lp* sender)
void dragonfly_collective(char const * category, int message_size, int remote_event_size, const void* remote_event, tw_lp* sender)
{
tw_event * e_new;
tw_stime xfer_to_nic_time;
......
......@@ -191,7 +191,7 @@ void model_net_print_stats(tw_lpid lpid, mn_stats mn_stats_array[])
model_net_write_stats(lpid, &all);
}
struct mn_stats* model_net_find_stats(const char* category, mn_stats mn_stats_array[])
struct mn_stats* model_net_find_stats(char const * category, mn_stats mn_stats_array[])
{
int i;
int new_flag = 0;
......@@ -223,17 +223,17 @@ struct mn_stats* model_net_find_stats(const char* category, mn_stats mn_stats_ar
static void model_net_event_impl_base(
int net_id,
const char * annotation,
char const * annotation,
int ignore_annotations,
char* category,
char const * category,
tw_lpid final_dest_lp,
uint64_t message_size,
int is_pull,
tw_stime offset,
int remote_event_size,
const void* remote_event,
void const * remote_event,
int self_event_size,
const void* self_event,
void const * self_event,
tw_lp *sender) {
if (remote_event_size + self_event_size + sizeof(model_net_wrap_msg)
......@@ -300,14 +300,14 @@ static void model_net_event_impl_base_rc(tw_lp *sender){
void model_net_event(
int net_id,
char* category,
char const * category,
tw_lpid final_dest_lp,
uint64_t message_size,
tw_stime offset,
int remote_event_size,
const void* remote_event,
void const * remote_event,
int self_event_size,
const void* self_event,
void const * self_event,
tw_lp *sender)
{
model_net_event_impl_base(net_id, NULL, 1, category, final_dest_lp,
......@@ -317,15 +317,15 @@ void model_net_event(
void model_net_event_annotated(
int net_id,
const char * annotation,
char* category,
char const * annotation,
char const * category,
tw_lpid final_dest_lp,
uint64_t message_size,
tw_stime offset,
int remote_event_size,
const void* remote_event,
void const * remote_event,
int self_event_size,
const void* self_event,
void const * self_event,
tw_lp *sender){
model_net_event_impl_base(net_id, annotation, 0, category, final_dest_lp,
message_size, 0, offset, remote_event_size, remote_event,
......@@ -334,12 +334,12 @@ void model_net_event_annotated(
void model_net_pull_event(
int net_id,
char *category,
char const *category,
tw_lpid final_dest_lp,
uint64_t message_size,
tw_stime offset,
int self_event_size,
const void *self_event,
void const *self_event,
tw_lp *sender){
/* NOTE: for a pull, we are filling the *remote* event - it will be remote
* from the destination's POV */
......@@ -350,13 +350,13 @@ void model_net_pull_event(
void model_net_pull_event_annotated(
int net_id,
const char * annotation,
char *category,
char const * annotation,
char const *category,
tw_lpid final_dest_lp,
uint64_t message_size,
tw_stime offset,
int self_event_size,
const void *self_event,
void const *self_event,
tw_lp *sender){
/* NOTE: for a pull, we are filling the *remote* event - it will be remote
* from the destination's POV */
......@@ -428,7 +428,7 @@ uint64_t model_net_get_packet_size(int net_id)
}
/* This event does a collective operation call for model-net */
void model_net_event_collective(int net_id, char* category, int message_size, int remote_event_size, const void* remote_event, tw_lp* sender)
void model_net_event_collective(int net_id, char const * category, int message_size, int remote_event_size, const void* remote_event, tw_lp* sender)
{
if(net_id < 0 || net_id > MAX_NETS)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment