changeset 10:7573c185aecf

add impl
author ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
date Tue, 25 Jan 2022 22:27:17 +0900
parents cc4cb64f9af9
children a3cda2aa18aa
files Paper/src/FileString.h Paper/src/LocalDGMQueue.h Paper/src/TQueue.h
diffstat 3 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Paper/src/FileString.h	Tue Jan 25 22:27:17 2022 +0900
@@ -0,0 +1,5 @@
+typedef struct FileString <> {
+  char str[1024];
+  int size;
+  int EoF;
+} FileString;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Paper/src/LocalDGMQueue.h	Tue Jan 25 22:27:17 2022 +0900
@@ -0,0 +1,6 @@
+typedef struct LocalDGMQueue <> impl CQueue {
+  struct Element* top;
+  struct Element* last;
+  struct Atomic* atomic;
+  int* socket;
+} LocalDGMQueue;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Paper/src/TQueue.h	Tue Jan 25 22:27:17 2022 +0900
@@ -0,0 +1,16 @@
+typedef struct TQueue<>{
+    union Data* tQueue;
+    union Data* data;
+    struct FileString* string;
+
+    __code whenEmpty(...);
+    __code whenEOF(...);
+    __code clear(Impl* tQueue, __code next(...));
+    __code put(Impl* tQueue, union Data* data, __code next(...));
+    __code take(Impl* tQueue, __code next(union Data* data, ...));
+    __code isEmpty(Impl* tQueue, __code next(...), __code whenEmpty(...));
+
+    __code sendData(Impl* tQueue, union Data* data, __code next(...));
+    __code getData(Impl* tQueue, __code next(...), __code whenEOF(...));
+    __code next(...);
+} TQueue;