Skip to content

Commit

Permalink
Fix definition of predefined ctx and team handles
Browse files Browse the repository at this point in the history
* Protect casts with parentheses ((type)value) to avoid issues with
  C operator precedence, cf. MPICH and Open MPI mpi.h header file.
  • Loading branch information
dalcinl committed Mar 14, 2023
1 parent 5f43bbd commit d009580
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/shmem.h.in.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ typedef void* shmem_team_t;
typedef struct {
int num_contexts;
} shmem_team_config_t;
#define SHMEM_TEAM_WORLD (shmem_team_t) 0x90000
#define SHMEM_TEAM_SHARED (shmem_team_t) 0x90001
#define SHMEM_TEAM_INVALID NULL
#define SHMEM_TEAM_WORLD ((shmem_team_t)0x90000)
#define SHMEM_TEAM_SHARED ((shmem_team_t)0x90001)
#define SHMEM_TEAM_INVALID ((shmem_team_t)NULL)

#define SHMEM_TEAM_NUM_CONTEXTS 0x091001L

Expand All @@ -104,8 +104,8 @@ typedef struct {
#define SHMEM_CTX_NOSTORE 0x001003L

typedef void* shmem_ctx_t;
#define SHMEM_CTX_DEFAULT (shmem_ctx_t) 0x80000
#define SHMEM_CTX_INVALID NULL
#define SHMEM_CTX_DEFAULT ((shmem_ctx_t)0x80000)
#define SHMEM_CTX_INVALID ((shmem_ctx_t)NULL)

/* Signaling Operations */
#define SHMEM_SIGNAL_SET 0
Expand Down

0 comments on commit d009580

Please sign in to comment.