Skip to content

Commit

Permalink
Adding some more minor space and comments fixes
Browse files Browse the repository at this point in the history
Fixing some typos and spacing/styling issues.

Signed-off-by: Vishwanath Venkatesan <[email protected]>
  • Loading branch information
Vishwanath Venkatesan committed Sep 21, 2023
1 parent 7fd9cdd commit d229f98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions oshmem/shmem/c/shmem_mcs_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
*
* $HEADER$
*/
/**
* @file
*/

#include "oshmem_config.h"

#include "oshmem/constants.h"
Expand All @@ -37,15 +35,15 @@ struct lock_t {
/** has meaning only on MCSQ_TAIL OWNER */
int tail;
/** It has meaning on all PEs */
/** The next pointer is a combination of the PE ID and wait signal */
/** The next pointer is a combination of the PE ID and wait signal */
int next;
};
typedef struct lock_t lock_t;

#define NEXT_MASK 0x7FFFFFFFU
#define SIGNAL_MASK 0x80000000U //Wait signal mask
#define SIGNAL_MASK 0x80000000U /** Wait signal mask */
#define NEXT(A) (A & NEXT_MASK)
#define GET_PE(P) (P & NEXT_MASK) // Improve readability
#define GET_PE(P) (P & NEXT_MASK) /** Improve readability */
#define SIGNAL(A) (A & SIGNAL_MASK)
#define SET_SIGNAL(A) (A | SIGNAL_MASK)

Expand Down Expand Up @@ -75,7 +73,7 @@ _shmem_mcs_set_lock(long *lockp)
* releasing it.
*/
/**
* Can make this to be shmem_atomic_set to be safe in non-cc architecutres
* Can make this to be shmem_atomic_set to be safe in non-cc architectures
* has an impact on performance
*/
value_tmp = NEXT_MASK;
Expand Down
1 change: 1 addition & 0 deletions oshmem/shmem/c/shmem_set_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*
* $HEADER$
*/

#include "oshmem_config.h"

#include "oshmem/constants.h"
Expand Down

0 comments on commit d229f98

Please sign in to comment.