annotate paper/src/singleContext.h @ 56:3a8c21a37bf1

interface
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 02 Feb 2021 14:17:05 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
56
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 union Data {
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 /* 略 */
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // Queue Interface
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 struct Queue {
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 union Data* queue;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 union Data* data;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 enum Code whenEmpty;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 enum Code clear;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 enum Code put;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 enum Code take;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 enum Code isEmpty;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 enum Code next;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 } Queue;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 struct SingleLinkedQueue {
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 struct Element* top;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 struct Element* last;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 } SingleLinkedQueue;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 struct SynchronizedQueue {
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 struct Element* top;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 struct Element* last;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 struct Atomic* atomic;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 } SynchronizedQueue;
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 /* 略 */
3a8c21a37bf1 interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 };