SG_BEGIN_DECL()
typedef struct {
- unsigned int lines, rows;
+ unsigned int lines;
+ unsigned int rows;
unsigned long elmsize;
char *data;
typedef struct graph_node_data {
int id;
int graph_id; /* used for caching internal graph id's */
-} s_graph_node_data_t, *graph_node_data_t;
+} s_graph_node_data_t;
+typedef s_graph_node_data_t* graph_node_data_t;
typedef struct graph_node_map_element {
xbt_node_t node;
-} s_graph_node_map_element_t, *graph_node_map_element_t;
+} s_graph_node_map_element_t;
+typedef s_graph_node_map_element_t* graph_node_map_element_t;
typedef struct route_cache_element {
int* pred_arr;
int size;
-} s_route_cache_element_t, *route_cache_element_t;
+} s_route_cache_element_t;
+typedef s_route_cache_element_t* route_cache_element_t;
namespace simgrid {
namespace kernel {
typedef struct s_smx_process_exit_fun {
int_f_pvoid_pvoid_t fun;
void *arg;
-} s_smx_process_exit_fun_t, *smx_process_exit_fun_t;
+} s_smx_process_exit_fun_t;
+typedef s_smx_process_exit_fun_t* smx_process_exit_fun_t;
namespace simgrid {
namespace simix {
typedef struct s_smpi_privatisation_region {
void* address;
int file_descriptor;
-} s_smpi_privatisation_region_t, *smpi_privatisation_region_t;
+} s_smpi_privatisation_region_t;
+typedef s_smpi_privatisation_region_t* smpi_privatisation_region_t;
extern XBT_PRIVATE smpi_privatisation_region_t smpi_privatisation_regions;
extern XBT_PRIVATE int smpi_loaded_page;
tmgr_trace_t state_trace;
const char* coord;
xbt_dict_t properties;
-} s_sg_platf_host_cbarg_t, *sg_platf_host_cbarg_t;
+} s_sg_platf_host_cbarg_t;
+typedef s_sg_platf_host_cbarg_t* sg_platf_host_cbarg_t;
typedef struct {
const char* id;
const char* link_up;
const char* link_down;
-} s_sg_platf_host_link_cbarg_t, *sg_platf_host_link_cbarg_t;
+} s_sg_platf_host_link_cbarg_t;
+typedef s_sg_platf_host_link_cbarg_t* sg_platf_host_link_cbarg_t;
class LinkCreationArgs {
public:
e_surf_link_sharing_policy_t bb_sharing_policy;
} s_sg_platf_cluster_cbarg_t;
-typedef struct s_sg_platf_cabinet_cbarg *sg_platf_cabinet_cbarg_t;
+typedef struct s_sg_platf_cabinet_cbarg* sg_platf_cabinet_cbarg_t;
typedef struct s_sg_platf_cabinet_cbarg {
const char* id;
const char* prefix;
double lat;
} s_sg_platf_cabinet_cbarg_t;
-typedef struct {
+typedef struct s_sg_platf_storage_cbarg* sg_platf_storage_cbarg_t;
+typedef struct s_sg_platf_storage_cbarg {
const char* id;
const char* type_id;
const char* content;
const char* content_type;
xbt_dict_t properties;
const char* attach;
-} s_sg_platf_storage_cbarg_t, *sg_platf_storage_cbarg_t;
+} s_sg_platf_storage_cbarg_t;
-typedef struct {
+typedef struct s_sg_platf_storage_type_cbarg* sg_platf_storage_type_cbarg_t;
+typedef struct s_sg_platf_storage_type_cbarg {
const char* id;
const char* model;
const char* content;
xbt_dict_t properties;
std::map<std::string, std::string>* model_properties;
sg_size_t size;
-} s_sg_platf_storage_type_cbarg_t, *sg_platf_storage_type_cbarg_t;
+} s_sg_platf_storage_type_cbarg_t;
-typedef struct {
+typedef struct s_sg_platf_mount_cbarg* sg_platf_mount_cbarg_t;
+typedef struct s_sg_platf_mount_cbarg {
const char* storageId;
const char* name;
-} s_sg_platf_mount_cbarg_t, *sg_platf_mount_cbarg_t;
+} s_sg_platf_mount_cbarg_t;
typedef struct s_sg_platf_prop_cbarg *sg_platf_prop_cbarg_t;
typedef struct s_sg_platf_prop_cbarg {
/** An virtual memory map entry from /proc/$pid/maps */
struct VmMap {
- std::uint64_t start_addr, end_addr;
+ std::uint64_t start_addr;
+ std::uint64_t end_addr;
int prot; /* Memory protection */
int flags; /* Additional memory flags */
std::uint64_t offset; /* Offset in the file/whatever */
{
XBT_INFO("Launching our nice bugged recursive function...");
unsigned i = 1;
- while (i <= 0x80000000u) {
+ while (i <= 0x80000000U) {
i *= 2;
unsigned res = collatz(i, i);
XBT_VERB("collatz(%u, %u) returned %u", i, i, res);
int i;
int rank;
int size;
- int *sendcounts, *recvcounts, *rdispls, *sdispls;
MPI_Init(&argc, &argv);
}
/* Create and load the arguments to alltoallv */
- sendcounts = (int *) xbt_malloc(size * sizeof(int));
- recvcounts = (int *) xbt_malloc(size * sizeof(int));
- rdispls = (int *) xbt_malloc(size * sizeof(int));
- sdispls = (int *) xbt_malloc(size * sizeof(int));
+ int* sendcounts = (int*)xbt_malloc(size * sizeof(int));
+ int* recvcounts = (int*)xbt_malloc(size * sizeof(int));
+ int* rdispls = (int*)xbt_malloc(size * sizeof(int));
+ int* sdispls = (int*)xbt_malloc(size * sizeof(int));
for (i = 0; i < size; i++) {
sendcounts[i] = i;
recvcounts[i] = rank;
static int parmap_skip_mode(e_xbt_parmap_mode_t mode)
{
- switch (mode) {
#if !HAVE_FUTEX_H
- case XBT_PARMAP_FUTEX:
+ if (mode == XBT_PARMAP_FUTEX) {
printf("not available\n");
return 1;
+ } else
#endif
- default:
return 0;
- }
}
static unsigned fibonacci(unsigned n)