HPCToolkit
mcs-lock.h File Reference
#include "stdatomic.h"
#include <stdbool.h>
Include dependency graph for mcs-lock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mcs_node_s
 
struct  mcs_lock_t
 

Macros

#define mcs_nil   (struct mcs_node_s*) 0
 

Typedefs

typedef struct mcs_node_s mcs_node_t
 

Functions

static void mcs_init (mcs_lock_t *l)
 
void mcs_lock (mcs_lock_t *l, mcs_node_t *me)
 
bool mcs_trylock (mcs_lock_t *l, mcs_node_t *me)
 
void mcs_unlock (mcs_lock_t *l, mcs_node_t *me)
 

Macro Definition Documentation

◆ mcs_nil

#define mcs_nil   (struct mcs_node_s*) 0

Definition at line 93 of file mcs-lock.h.

Typedef Documentation

◆ mcs_node_t

typedef struct mcs_node_s mcs_node_t

Function Documentation

◆ mcs_init()

static void mcs_init ( mcs_lock_t l)
inlinestatic

Definition at line 100 of file mcs-lock.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mcs_lock()

void mcs_lock ( mcs_lock_t l,
mcs_node_t me 
)

Definition at line 77 of file mcs-lock.c.

Here is the caller graph for this function:

◆ mcs_trylock()

bool mcs_trylock ( mcs_lock_t l,
mcs_node_t me 
)

Definition at line 122 of file mcs-lock.c.

Here is the caller graph for this function:

◆ mcs_unlock()

void mcs_unlock ( mcs_lock_t l,
mcs_node_t me 
)

Definition at line 146 of file mcs-lock.c.

Here is the caller graph for this function: