rt_benchs/communication_techniques/include/jikes_barrier_comm.h

36 lines
710 B
C

#ifndef __COMM_H_
#define __COMM_H_ 1
#include <stdint.h>
/* Non standard include */
#include <common_comm.h>
#define FAKE_NURSERY_START 1
#define REALLY_FAKE_NURSERY_START ((uintptr_t) -1)
struct communication_assoc
{
struct communication_assoc *next;
struct communication_assoc *prev;
pthread_t tid;
};
extern struct communication_assoc assoc_root;
__BEGIN_DECLS
struct communication_assoc *create_comm_assoc(void);
void insert(void *);
static inline void send(void **addr) {
void *ptd_addr;
ptd_addr = *addr; /* NOTE: Not done in real jikes barrier */
if (!((uintptr_t) addr >= REALLY_FAKE_NURSERY_START) && ((uintptr_t) ptd_addr >= FAKE_NURSERY_START))
insert(addr);
}
__END_DECLS
#endif