changes
[cdsspec-compiler.git] / benchmark / ms-queue / my_queue.h
index 0768428df5d9fadc1a1b29195b3de2c94068e87b..ce87b1d22eb5af1bace1c84c7356f89e4767ee58 100644 (file)
@@ -54,6 +54,11 @@ void init_queue(queue_t *q, int num_threads);
                @InitVar:
                        __queue = new_spec_list();
                        tag = new_id_tag(); // Beginning of available id
+               @Cleanup:
+                       if (__queue)
+                               free_spec_list(__queue);
+                       if (tag)
+                               free_id_tag(tag);
                @DefineFunc:
                        tag_elem_t* new_tag_elem(call_id_t id, unsigned int data) {
                                tag_elem_t *e = (tag_elem_t*) CMODEL_MALLOC(sizeof(tag_elem_t));
@@ -88,7 +93,7 @@ void init_queue(queue_t *q, int num_threads);
 /**
        @Begin
        @Interface: Enqueue
-       @Commit_point_set: Enqueue_Read_Tail | Enqueue_UpdateNext
+       @Commit_point_set: Enqueue_Read_Tail | Enqueue_UpdateNext | Enqueue_Additional_Tail_LoadOrCAS
        @ID: get_and_inc(tag)
        @Action:
                # __ID__ is an internal macro that refers to the id of the current