33 lines
601 B
C
33 lines
601 B
C
#ifndef _SPECIFIC_COMM_H_
|
|
#define _SPECIFIC_COMM_H_ 1
|
|
|
|
#include <stdint.h>
|
|
|
|
#define FAKE_NURSERY_START 1
|
|
#define ANOTHER_FAKE_NURSERY_START ((uintptr_t) -1)
|
|
|
|
struct thread_comm
|
|
{
|
|
int unused;
|
|
};
|
|
|
|
extern struct thread_comm *tcomms;
|
|
|
|
__BEGIN_DECLS
|
|
|
|
int init_thread_comm(struct thread_comm *);
|
|
int end_thread_comm(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 >= ANOTHER_FAKE_NURSERY_START) && ((uintptr_t) ptd_addr >= FAKE_NURSERY_START))
|
|
insert(addr);
|
|
}
|
|
|
|
__END_DECLS
|
|
|
|
#endif
|