uint64_t ref_count
the number of users of this piece of data
static uint64_t Data_entry_get_key(struct Data_entry *de)
Getter on the Data_entry key.
short been_resubmitted
1 if it has been re-submitted
int MALP_Spinlock_unlock(MALP_Spinlock *mutex)
Unlocks the given MALP_Spinlock.
static void Data_entry_reset_ref_count(struct Data_entry *de)
Resets the ref_count of a Data_entry.
static size_t Data_entry_get_payload_size(struct Data_entry *de)
Getter on the Data_entry payload size.
static void * Data_entry_get_payload(struct Data_entry *de)
Getter on the actual data of a Data_entry.
uint64_t key
the key, identifying the type of data
void Data_entry_release(struct Data_entry *de)
Clears a Data_entry.
static uint64_t Data_entry_get_ref_count(struct Data_entry *de)
Getter on the ref_count of a Data_entry.
int MALP_Spinlock_lock(MALP_Spinlock *mutex)
Locks the given MALP_Spinlock.
struct Data_entry * Data_entry_init(uint64_t key, void *payload, size_t size)
Creates a new Data_entry.
volatile unsigned int MALP_Spinlock
The type of spinlocks in MALP.
static uint64_t Data_entry_dec_ref_count(struct Data_entry *de)
Decrements the ref_count of a Data_entry.
size_t size
the size of the data available in payload
MALP_Spinlock lock
a lock for concurrent access
Struct defining a piece of data that can exist on the blackboard.
struct Data_entry * Data_entry_clone(struct Data_entry *de)
Clones a Data_entry.
static void Data_entry_inc_ref_count(struct Data_entry *de, uint64_t val)
Increments the ref_count of a Data_entry by a given value.
char payload[0]
the actual data