Mercurial > hg > GearsTemplate
diff src/parallel_execution/context.h @ 441:5a737c3df91c
Add AtomicReference Implements of Atomic Interface
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 Nov 2017 04:28:36 +0900 |
parents | 7679093bdd72 |
children | 0c024ea61601 |
line wrap: on
line diff
--- a/src/parallel_execution/context.h Mon Nov 06 19:04:41 2017 +0900 +++ b/src/parallel_execution/context.h Tue Nov 21 04:28:36 2017 +0900 @@ -128,7 +128,7 @@ long size; long len; struct Queue* wait; // tasks waiting this dataGear - } meta; + } Meta; struct Context Context; struct Time { union Data* time; @@ -301,6 +301,16 @@ Black, } color; } Node; + struct Atomic { + union Data* atomic; + union Data* data; + enum Code checkAndSet; + enum Code next; + enum Code fail; + } Atomic; + struct AtomicReference { + union Data* data; + } AtomicReference; struct Semaphore { union Data* semaphore; enum Code p;