tag = new_id_tag(); // Beginning of available id
@DefineFunc:
tag_elem_t* new_tag_elem(call_id_t id, unsigned int data) {
- tag_elem_t *e = (tag_elem_t*) malloc(sizeof(tag_elem_t));
+ tag_elem_t *e = (tag_elem_t*) MODEL_MALLOC(sizeof(tag_elem_t));
e->id = id;
e->data = data;
return e;
}
-
+ @DefineFunc:
void free_tag_elem(tag_elem_t *e) {
free(e);
}
-
+ @DefineFunc:
call_id_t get_id(void *wrapper) {
return ((tag_elem_t*) wrapper)->id;
}
-
+ @DefineFunc:
unsigned int get_data(void *wrapper) {
return ((tag_elem_t*) wrapper)->data;
}
-
@Happens_before:
# Only check the happens-before relationship according to the id of the
# commit_point_set. For commit_point_set that has same ID, A -> B means
@Action:
# __ID__ is an internal macro that refers to the id of the current
# interface call
- tag_elem_t elem = new_tag_elem(__ID__, val);
+ tag_elem_t *elem = new_tag_elem(__ID__, val);
push_back(__queue, elem);
@End
*/
/**
@Begin
@Interface: Dequeue
- @Commit_point_set: Dequeue_Success_Point
+ @Commit_point_set: Dequeue_Success_Point | Dequeue_Empty_Point
@ID: get_id(back(__queue))
@Action:
unsigned int _Old_Val = get_data(front(__queue));