projects
/
cdsspec-compiler.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add spsc
[cdsspec-compiler.git]
/
benchmark
/
ms-queue
/
my_queue.h
diff --git
a/benchmark/ms-queue/my_queue.h
b/benchmark/ms-queue/my_queue.h
index d4999299351daa98109cf96b938cce0cdfeb1fd7..fa64d6083a7abb9f1e4f67568da97b1d51c0b149 100644
(file)
--- a/
benchmark/ms-queue/my_queue.h
+++ b/
benchmark/ms-queue/my_queue.h
@@
-32,6
+32,8
@@
void init_queue(queue_t *q, int num_threads);
/**
@Begin
/**
@Begin
+ @Options:
+ LANG = C;
@Global_define:
@DeclareStruct:
typedef struct tag_elem {
@Global_define:
@DeclareStruct:
typedef struct tag_elem {
@@
-47,7
+49,7
@@
void init_queue(queue_t *q, int num_threads);
tag = new_id_tag(); // Beginning of available id
@DefineFunc:
tag_elem_t* new_tag_elem(call_id_t id, unsigned int data) {
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*) MODEL_MALLOC(sizeof(tag_elem_t));
+ tag_elem_t *e = (tag_elem_t*)
C
MODEL_MALLOC(sizeof(tag_elem_t));
e->id = id;
e->data = data;
return e;
e->id = id;
e->data = data;
return e;
@@
-78,7
+80,7
@@
void init_queue(queue_t *q, int num_threads);
@Begin
@Interface: Enqueue
@Commit_point_set: Enqueue_Success_Point
@Begin
@Interface: Enqueue
@Commit_point_set: Enqueue_Success_Point
- @ID: get_and_inc(tag)
;
+ @ID: get_and_inc(tag)
@Action:
# __ID__ is an internal macro that refers to the id of the current
# interface call
@Action:
# __ID__ is an internal macro that refers to the id of the current
# interface call
@@
-92,7
+94,7
@@
void enqueue(queue_t *q, unsigned int val);
@Begin
@Interface: Dequeue
@Commit_point_set: Dequeue_Success_Point | Dequeue_Empty_Point
@Begin
@Interface: Dequeue
@Commit_point_set: Dequeue_Success_Point | Dequeue_Empty_Point
- @ID: get_id(
back
(__queue))
+ @ID: get_id(
front
(__queue))
@Action:
unsigned int _Old_Val = get_data(front(__queue));
pop_front(__queue);
@Action:
unsigned int _Old_Val = get_data(front(__queue));
pop_front(__queue);