Asg
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- 1410 discussions
#7: integrate library linking and paths with aecc
---------------------------+------------------------------------------------
Reporter: carns | Owner: carns
Type: defect | Status: accepted
Priority: major | Component: code generator
Version: git repository | Keywords:
---------------------------+------------------------------------------------
Changes (by carns):
* owner: somebody => carns
* status: new => accepted
--
Ticket URL: <https://trac.mcs.anl.gov/projects/aesop/ticket/7#comment:4>
aesop <https://trac.mcs.anl.gov/projects/aesop>
The Aesop Language
1
0
#21: make install does not install timer & other resources
---------------------------+------------------------------------------------
Reporter: dkimpe | Owner:
Type: defect | Status: new
Priority: major | Component: build system
Version: git repository | Keywords:
---------------------------+------------------------------------------------
{{{make install}}} only installs enough to be able to run the source to
source translator.
It does not install the headers for the timer & other resources.
--
Ticket URL: <http://trac.mcs.anl.gov/projects/aesop/ticket/21>
aesop <https://trac.mcs.anl.gov/projects/aesop>
The Aesop Language
1
2
aesop Repository branch, master, updated. fc2284c8031c4507b33af0dd7beef85cd99dc806
by noreply@mcs.anl.gov 26 Mar '12
by noreply@mcs.anl.gov 26 Mar '12
26 Mar '12
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "aesop Repository".
The branch, master has been updated
via fc2284c8031c4507b33af0dd7beef85cd99dc806 (commit)
via 6755a02f21096b5718ebeed5e0a400218a7509de (commit)
from 4f797c1277d3fb7a83222119351bfff6478ce4d5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fc2284c8031c4507b33af0dd7beef85cd99dc806
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 16:56:20 2012 -0400
update c-utils
commit 6755a02f21096b5718ebeed5e0a400218a7509de
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 16:52:55 2012 -0400
adjust include paths in test programs
- also add aesop-support.hae to installed headers
-----------------------------------------------------------------------
Summary of changes:
aesop-support.hae | 5 ++---
module.mk.in | 3 ++-
parser/tests/blocking/afterwhile.ae | 2 +-
parser/tests/blocking/basic-struct-init.ae | 2 +-
parser/tests/blocking/basic-struct-return.ae | 2 +-
parser/tests/blocking/basic.ae | 2 +-
parser/tests/blocking/cancel-pbranch-loop.ae | 4 ++--
parser/tests/blocking/cancel-pbranch1.ae | 4 ++--
parser/tests/blocking/cancel-pbranch2.ae | 4 ++--
parser/tests/blocking/cancel-pbranch3.ae | 4 ++--
parser/tests/blocking/cancel-pbranch4.ae | 4 ++--
parser/tests/blocking/compound.ae | 2 +-
parser/tests/blocking/dowhileloop.ae | 2 +-
parser/tests/blocking/forloop.ae | 2 +-
parser/tests/blocking/forloop2.ae | 2 +-
parser/tests/blocking/forloop3.ae | 2 +-
parser/tests/blocking/funptrs.ae | 2 +-
parser/tests/blocking/icpfor.ae | 2 +-
parser/tests/blocking/if.ae | 2 +-
parser/tests/blocking/ifnbelse.ae | 2 +-
parser/tests/blocking/ifnoelse.ae | 2 +-
parser/tests/blocking/ifnoelse2.ae | 2 +-
.../blocking/lonely-pbranch-variable-scope.ae | 4 ++--
parser/tests/blocking/lonely-pbranch.ae | 4 ++--
parser/tests/blocking/lonely-pbranch2.ae | 4 ++--
parser/tests/blocking/lonely-pbranch3.ae | 4 ++--
parser/tests/blocking/lonely-pbranch4.ae | 4 ++--
parser/tests/blocking/mixed.ae | 2 +-
parser/tests/blocking/multif.ae | 2 +-
parser/tests/blocking/nbfun.ae | 2 +-
parser/tests/blocking/nested-forloop.ae | 2 +-
parser/tests/blocking/nested.ae | 2 +-
parser/tests/blocking/parallel1.ae | 2 +-
parser/tests/blocking/parallel2.ae | 2 +-
parser/tests/blocking/parallel3.ae | 2 +-
parser/tests/blocking/parallel4.ae | 2 +-
parser/tests/blocking/parallelfor.ae | 2 +-
parser/tests/blocking/parallelfor2.ae | 2 +-
parser/tests/blocking/parallelfor3.ae | 2 +-
parser/tests/blocking/params.ae | 2 +-
parser/tests/blocking/pbranch-completion.ae | 2 +-
parser/tests/blocking/pbranch-with-return.ae | 2 +-
parser/tests/blocking/pbreak-before-blocking.ae | 5 ++---
parser/tests/blocking/pbreak-immed-cancel.ae | 4 ++--
parser/tests/blocking/pbreak.ae | 4 ++--
parser/tests/blocking/pbreak2.ae | 4 ++--
parser/tests/blocking/pbreak3.ae | 4 ++--
parser/tests/blocking/pbreak4.ae | 4 ++--
parser/tests/blocking/pbreak5.ae | 4 ++--
parser/tests/blocking/pbreak6.ae | 4 ++--
parser/tests/blocking/pbreak7.ae | 4 ++--
parser/tests/blocking/pbreak8.ae | 4 ++--
parser/tests/blocking/pprivate.ae | 2 +-
parser/tests/blocking/pshared.ae | 2 +-
parser/tests/blocking/pwait-in-for.ae | 2 +-
parser/tests/blocking/pwait-in-while.ae | 2 +-
parser/tests/blocking/tcpfor.ae | 2 +-
parser/tests/blocking/threefors.ae | 2 +-
parser/tests/blocking/twofors.ae | 2 +-
parser/tests/blocking/whilebreak.ae | 2 +-
parser/tests/blocking/whilebreak2.ae | 2 +-
parser/tests/blocking/whilebreak3.ae | 2 +-
parser/tests/blocking/whileloop.ae | 2 +-
resources/thread/test/aethread-cancel.ae | 8 ++++----
resources/thread/test/aethread-example.ae | 4 ++--
resources/timer/test/pthread-compare.ae | 4 ++--
resources/timer/test/timer-cancel.ae | 6 +++---
resources/timer/test/timer1.ae | 4 ++--
resources/timer/test/timer2.ae | 4 ++--
src/aefile/test/aefile-example.ae | 6 +++---
src/c-utils | 2 +-
src/socket/aesocket.hae | 2 +-
src/socket/module.mk.in | 1 +
src/socket/test/simple.ae | 8 ++++----
src/ssm/test/ssmget.ae | 6 +++---
src/ssm/test/ssmmsg.ae | 6 +++---
src/ssm/test/ssmping.ae | 6 +++---
src/ssm/test/ssmput.ae | 6 +++---
tests/test-hints.ae | 4 ++--
79 files changed, 124 insertions(+), 124 deletions(-)
Diff of changes:
diff --git a/aesop-support.hae b/aesop-support.hae
index 012f89e..805ec16 100644
--- a/aesop-support.hae
+++ b/aesop-support.hae
@@ -1,9 +1,8 @@
#ifndef __AESOP_SUPPORT_HAE__
#define __AESOP_SUPPORT_HAE__
-#include "aesop.h"
-#include "resource.h"
-#include "resources/timer/timer.hae"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
/** TODO: need to fix this. depends on timer */
diff --git a/module.mk.in b/module.mk.in
index ffe87c5..bd236c1 100644
--- a/module.mk.in
+++ b/module.mk.in
@@ -15,4 +15,5 @@ INSTALL_HDR += ae-types.h \
ae-blocking-parser.h \
hints.h \
ae-init.h \
- ae-debug.h
+ ae-debug.h \
+ aesop-support.hae
diff --git a/parser/tests/blocking/afterwhile.ae b/parser/tests/blocking/afterwhile.ae
index 01e6ca1..e1e9bf5 100644
--- a/parser/tests/blocking/afterwhile.ae
+++ b/parser/tests/blocking/afterwhile.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static int here = 0;
diff --git a/parser/tests/blocking/basic-struct-init.ae b/parser/tests/blocking/basic-struct-init.ae
index 3f0440a..cb58ac6 100644
--- a/parser/tests/blocking/basic-struct-init.ae
+++ b/parser/tests/blocking/basic-struct-init.ae
@@ -3,7 +3,7 @@
*/
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
struct foo
diff --git a/parser/tests/blocking/basic-struct-return.ae b/parser/tests/blocking/basic-struct-return.ae
index ad25659..69d08ac 100644
--- a/parser/tests/blocking/basic-struct-return.ae
+++ b/parser/tests/blocking/basic-struct-return.ae
@@ -1,6 +1,6 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
struct foo
diff --git a/parser/tests/blocking/basic.ae b/parser/tests/blocking/basic.ae
index 91af433..442fdf2 100644
--- a/parser/tests/blocking/basic.ae
+++ b/parser/tests/blocking/basic.ae
@@ -1,6 +1,6 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_basic(void)
diff --git a/parser/tests/blocking/cancel-pbranch-loop.ae b/parser/tests/blocking/cancel-pbranch-loop.ae
index 3a4582b..626c7e0 100644
--- a/parser/tests/blocking/cancel-pbranch-loop.ae
+++ b/parser/tests/blocking/cancel-pbranch-loop.ae
@@ -1,8 +1,8 @@
#include <unistd.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_test(void)
{
diff --git a/parser/tests/blocking/cancel-pbranch1.ae b/parser/tests/blocking/cancel-pbranch1.ae
index 2b04650..8a22f70 100644
--- a/parser/tests/blocking/cancel-pbranch1.ae
+++ b/parser/tests/blocking/cancel-pbranch1.ae
@@ -1,8 +1,8 @@
#include <unistd.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
+#include <aesop/aesop-support.hae>
static __blocking void foo_fn(void)
{
diff --git a/parser/tests/blocking/cancel-pbranch2.ae b/parser/tests/blocking/cancel-pbranch2.ae
index 92a56bc..21bbbb2 100644
--- a/parser/tests/blocking/cancel-pbranch2.ae
+++ b/parser/tests/blocking/cancel-pbranch2.ae
@@ -1,8 +1,8 @@
#include <unistd.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_test(void)
{
diff --git a/parser/tests/blocking/cancel-pbranch3.ae b/parser/tests/blocking/cancel-pbranch3.ae
index 502bf4e..f21ca57 100644
--- a/parser/tests/blocking/cancel-pbranch3.ae
+++ b/parser/tests/blocking/cancel-pbranch3.ae
@@ -1,8 +1,8 @@
#include <unistd.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_test(void)
{
diff --git a/parser/tests/blocking/cancel-pbranch4.ae b/parser/tests/blocking/cancel-pbranch4.ae
index 22f371d..cfcf5f9 100644
--- a/parser/tests/blocking/cancel-pbranch4.ae
+++ b/parser/tests/blocking/cancel-pbranch4.ae
@@ -1,8 +1,8 @@
#include <unistd.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_test(void)
{
diff --git a/parser/tests/blocking/compound.ae b/parser/tests/blocking/compound.ae
index 9bb0039..135b552 100644
--- a/parser/tests/blocking/compound.ae
+++ b/parser/tests/blocking/compound.ae
@@ -2,7 +2,7 @@
#include <assert.h>
#include <unistd.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
__blocking int blah(void)
diff --git a/parser/tests/blocking/dowhileloop.ae b/parser/tests/blocking/dowhileloop.ae
index 6964b41..cb2b202 100644
--- a/parser/tests/blocking/dowhileloop.ae
+++ b/parser/tests/blocking/dowhileloop.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/forloop.ae b/parser/tests/blocking/forloop.ae
index 560c8ba..1ab2a0d 100644
--- a/parser/tests/blocking/forloop.ae
+++ b/parser/tests/blocking/forloop.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/forloop2.ae b/parser/tests/blocking/forloop2.ae
index 998ce57..8096efa 100644
--- a/parser/tests/blocking/forloop2.ae
+++ b/parser/tests/blocking/forloop2.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/forloop3.ae b/parser/tests/blocking/forloop3.ae
index beaed32..d3d21ca 100644
--- a/parser/tests/blocking/forloop3.ae
+++ b/parser/tests/blocking/forloop3.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/funptrs.ae b/parser/tests/blocking/funptrs.ae
index cefa61f..f567228 100644
--- a/parser/tests/blocking/funptrs.ae
+++ b/parser/tests/blocking/funptrs.ae
@@ -1,5 +1,5 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
struct mystruct
diff --git a/parser/tests/blocking/icpfor.ae b/parser/tests/blocking/icpfor.ae
index ec51759..77ac9e4 100644
--- a/parser/tests/blocking/icpfor.ae
+++ b/parser/tests/blocking/icpfor.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_parfor(void)
diff --git a/parser/tests/blocking/if.ae b/parser/tests/blocking/if.ae
index c0ee71b..0de4446 100644
--- a/parser/tests/blocking/if.ae
+++ b/parser/tests/blocking/if.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/ifnbelse.ae b/parser/tests/blocking/ifnbelse.ae
index 7e42c74..3eb7d35 100644
--- a/parser/tests/blocking/ifnbelse.ae
+++ b/parser/tests/blocking/ifnbelse.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/ifnoelse.ae b/parser/tests/blocking/ifnoelse.ae
index 57f0ef6..a4c5f93 100644
--- a/parser/tests/blocking/ifnoelse.ae
+++ b/parser/tests/blocking/ifnoelse.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/ifnoelse2.ae b/parser/tests/blocking/ifnoelse2.ae
index fb10dd8..83a1b57 100644
--- a/parser/tests/blocking/ifnoelse2.ae
+++ b/parser/tests/blocking/ifnoelse2.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/lonely-pbranch-variable-scope.ae b/parser/tests/blocking/lonely-pbranch-variable-scope.ae
index e55aef1..c533b36 100644
--- a/parser/tests/blocking/lonely-pbranch-variable-scope.ae
+++ b/parser/tests/blocking/lonely-pbranch-variable-scope.ae
@@ -1,8 +1,8 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
#include "parser/tests/blocking/btest.hae"
-#include "resources/timer/timer.hae"
static __blocking void lonely_pbranch(void)
{
diff --git a/parser/tests/blocking/lonely-pbranch.ae b/parser/tests/blocking/lonely-pbranch.ae
index 9a7eacc..39893c3 100644
--- a/parser/tests/blocking/lonely-pbranch.ae
+++ b/parser/tests/blocking/lonely-pbranch.ae
@@ -1,8 +1,8 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
#include "parser/tests/blocking/btest.hae"
-#include "resources/timer/timer.hae"
static __blocking void lonely_pbranch(void)
{
diff --git a/parser/tests/blocking/lonely-pbranch2.ae b/parser/tests/blocking/lonely-pbranch2.ae
index 52f8b32..909bacc 100644
--- a/parser/tests/blocking/lonely-pbranch2.ae
+++ b/parser/tests/blocking/lonely-pbranch2.ae
@@ -1,8 +1,8 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
-#include "resources/timer/timer.hae"
+#include <aesop/timer.hae>
static __blocking void lonely_pbranch(void)
{
diff --git a/parser/tests/blocking/lonely-pbranch3.ae b/parser/tests/blocking/lonely-pbranch3.ae
index e101276..6bf8a76 100644
--- a/parser/tests/blocking/lonely-pbranch3.ae
+++ b/parser/tests/blocking/lonely-pbranch3.ae
@@ -1,8 +1,8 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
#include "parser/tests/blocking/btest.hae"
-#include "resources/timer/timer.hae"
static __blocking void noop(void)
{
diff --git a/parser/tests/blocking/lonely-pbranch4.ae b/parser/tests/blocking/lonely-pbranch4.ae
index fc6371c..ec9a298 100644
--- a/parser/tests/blocking/lonely-pbranch4.ae
+++ b/parser/tests/blocking/lonely-pbranch4.ae
@@ -1,8 +1,8 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
#include "parser/tests/blocking/btest.hae"
-#include "resources/timer/timer.hae"
static __blocking void lonely_pbranch(void)
{
diff --git a/parser/tests/blocking/mixed.ae b/parser/tests/blocking/mixed.ae
index 76baba6..aa8c5e8 100644
--- a/parser/tests/blocking/mixed.ae
+++ b/parser/tests/blocking/mixed.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/multif.ae b/parser/tests/blocking/multif.ae
index 6d9da4d..b3b8503 100644
--- a/parser/tests/blocking/multif.ae
+++ b/parser/tests/blocking/multif.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
int val = 0;
diff --git a/parser/tests/blocking/nbfun.ae b/parser/tests/blocking/nbfun.ae
index d62639a..5694faa 100644
--- a/parser/tests/blocking/nbfun.ae
+++ b/parser/tests/blocking/nbfun.ae
@@ -1,5 +1,5 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking int run_inner_nbfun1(void)
diff --git a/parser/tests/blocking/nested-forloop.ae b/parser/tests/blocking/nested-forloop.ae
index 047e51a..4a3a6d2 100644
--- a/parser/tests/blocking/nested-forloop.ae
+++ b/parser/tests/blocking/nested-forloop.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/nested.ae b/parser/tests/blocking/nested.ae
index 9d996b5..038a960 100644
--- a/parser/tests/blocking/nested.ae
+++ b/parser/tests/blocking/nested.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static int here = 0;
diff --git a/parser/tests/blocking/parallel1.ae b/parser/tests/blocking/parallel1.ae
index 8d065f6..9f861e7 100644
--- a/parser/tests/blocking/parallel1.ae
+++ b/parser/tests/blocking/parallel1.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/parallel2.ae b/parser/tests/blocking/parallel2.ae
index 1e50c2b..b81b96d 100644
--- a/parser/tests/blocking/parallel2.ae
+++ b/parser/tests/blocking/parallel2.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/parallel3.ae b/parser/tests/blocking/parallel3.ae
index c2b138e..372beec 100644
--- a/parser/tests/blocking/parallel3.ae
+++ b/parser/tests/blocking/parallel3.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/parallel4.ae b/parser/tests/blocking/parallel4.ae
index 4b1f64a..451698c 100644
--- a/parser/tests/blocking/parallel4.ae
+++ b/parser/tests/blocking/parallel4.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/parallelfor.ae b/parser/tests/blocking/parallelfor.ae
index 11eac19..907ab88 100644
--- a/parser/tests/blocking/parallelfor.ae
+++ b/parser/tests/blocking/parallelfor.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_parfor(void)
diff --git a/parser/tests/blocking/parallelfor2.ae b/parser/tests/blocking/parallelfor2.ae
index 292186e..c67989e 100644
--- a/parser/tests/blocking/parallelfor2.ae
+++ b/parser/tests/blocking/parallelfor2.ae
@@ -4,7 +4,7 @@
* See COPYING in top-level directory.
*/
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_parfor(
diff --git a/parser/tests/blocking/parallelfor3.ae b/parser/tests/blocking/parallelfor3.ae
index 1f7f42e..780c522 100644
--- a/parser/tests/blocking/parallelfor3.ae
+++ b/parser/tests/blocking/parallelfor3.ae
@@ -4,7 +4,7 @@
* See COPYING in top-level directory.
*/
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_parfor(
diff --git a/parser/tests/blocking/params.ae b/parser/tests/blocking/params.ae
index c5d72a6..712e741 100644
--- a/parser/tests/blocking/params.ae
+++ b/parser/tests/blocking/params.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_params(int a, const char *b, const char *c)
diff --git a/parser/tests/blocking/pbranch-completion.ae b/parser/tests/blocking/pbranch-completion.ae
index d2bdd23..f399975 100644
--- a/parser/tests/blocking/pbranch-completion.ae
+++ b/parser/tests/blocking/pbranch-completion.ae
@@ -3,7 +3,7 @@
#include <unistd.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
__blocking void do_random_test(void)
diff --git a/parser/tests/blocking/pbranch-with-return.ae b/parser/tests/blocking/pbranch-with-return.ae
index 041fc78..3d98d42 100644
--- a/parser/tests/blocking/pbranch-with-return.ae
+++ b/parser/tests/blocking/pbranch-with-return.ae
@@ -1,5 +1,5 @@
#include <assert.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking int pbranch_with_return(void)
diff --git a/parser/tests/blocking/pbreak-before-blocking.ae b/parser/tests/blocking/pbreak-before-blocking.ae
index e175653..7b45382 100644
--- a/parser/tests/blocking/pbreak-before-blocking.ae
+++ b/parser/tests/blocking/pbreak-before-blocking.ae
@@ -1,8 +1,7 @@
-
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_par1(void)
{
diff --git a/parser/tests/blocking/pbreak-immed-cancel.ae b/parser/tests/blocking/pbreak-immed-cancel.ae
index 55b5492..9f0ac5e 100644
--- a/parser/tests/blocking/pbreak-immed-cancel.ae
+++ b/parser/tests/blocking/pbreak-immed-cancel.ae
@@ -1,7 +1,7 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_pbreak(void)
{
diff --git a/parser/tests/blocking/pbreak.ae b/parser/tests/blocking/pbreak.ae
index cdd6e7a..82a9435 100644
--- a/parser/tests/blocking/pbreak.ae
+++ b/parser/tests/blocking/pbreak.ae
@@ -1,7 +1,7 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_pbreak(void)
{
diff --git a/parser/tests/blocking/pbreak2.ae b/parser/tests/blocking/pbreak2.ae
index b9ab983..bffe5fd 100644
--- a/parser/tests/blocking/pbreak2.ae
+++ b/parser/tests/blocking/pbreak2.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
-#include "aesop-support.hae"
static __blocking void run_pbreak2(void)
{
diff --git a/parser/tests/blocking/pbreak3.ae b/parser/tests/blocking/pbreak3.ae
index 2ef6154..785e249 100644
--- a/parser/tests/blocking/pbreak3.ae
+++ b/parser/tests/blocking/pbreak3.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
-#include "aesop-support.hae"
static __blocking void run_pbreak3(void)
{
diff --git a/parser/tests/blocking/pbreak4.ae b/parser/tests/blocking/pbreak4.ae
index 04c26d4..c2e4063 100644
--- a/parser/tests/blocking/pbreak4.ae
+++ b/parser/tests/blocking/pbreak4.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
-#include "aesop-support.hae"
static __blocking void run_pbreak4(void)
{
diff --git a/parser/tests/blocking/pbreak5.ae b/parser/tests/blocking/pbreak5.ae
index dfb89ad..9ca11d6 100644
--- a/parser/tests/blocking/pbreak5.ae
+++ b/parser/tests/blocking/pbreak5.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
-#include "aesop-support.hae"
static __blocking void run_pbreak5(void)
{
diff --git a/parser/tests/blocking/pbreak6.ae b/parser/tests/blocking/pbreak6.ae
index d0f6748..ef469cf 100644
--- a/parser/tests/blocking/pbreak6.ae
+++ b/parser/tests/blocking/pbreak6.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
-#include "aesop-support.hae"
static __blocking void run_pbreak6(void)
{
diff --git a/parser/tests/blocking/pbreak7.ae b/parser/tests/blocking/pbreak7.ae
index 7056963..b51fcf8 100644
--- a/parser/tests/blocking/pbreak7.ae
+++ b/parser/tests/blocking/pbreak7.ae
@@ -1,7 +1,7 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_par1(void)
{
diff --git a/parser/tests/blocking/pbreak8.ae b/parser/tests/blocking/pbreak8.ae
index 7d4f3a7..117d09c 100644
--- a/parser/tests/blocking/pbreak8.ae
+++ b/parser/tests/blocking/pbreak8.ae
@@ -1,7 +1,7 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
-#include "aesop-support.hae"
static __blocking void run_par1(void)
{
diff --git a/parser/tests/blocking/pprivate.ae b/parser/tests/blocking/pprivate.ae
index 7959ebf..4e37240 100644
--- a/parser/tests/blocking/pprivate.ae
+++ b/parser/tests/blocking/pprivate.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/pshared.ae b/parser/tests/blocking/pshared.ae
index c9f947c..3f05e86 100644
--- a/parser/tests/blocking/pshared.ae
+++ b/parser/tests/blocking/pshared.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/pwait-in-for.ae b/parser/tests/blocking/pwait-in-for.ae
index e66005c..dec4ccd 100644
--- a/parser/tests/blocking/pwait-in-for.ae
+++ b/parser/tests/blocking/pwait-in-for.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking int run_forloop(void)
diff --git a/parser/tests/blocking/pwait-in-while.ae b/parser/tests/blocking/pwait-in-while.ae
index 80c5ae8..0fb729d 100644
--- a/parser/tests/blocking/pwait-in-while.ae
+++ b/parser/tests/blocking/pwait-in-while.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_whileloop(void)
diff --git a/parser/tests/blocking/tcpfor.ae b/parser/tests/blocking/tcpfor.ae
index 2596fb4..673fa2b 100644
--- a/parser/tests/blocking/tcpfor.ae
+++ b/parser/tests/blocking/tcpfor.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_parfor(void)
diff --git a/parser/tests/blocking/threefors.ae b/parser/tests/blocking/threefors.ae
index 401972b..02227a7 100644
--- a/parser/tests/blocking/threefors.ae
+++ b/parser/tests/blocking/threefors.ae
@@ -1,5 +1,5 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
#include <assert.h>
diff --git a/parser/tests/blocking/twofors.ae b/parser/tests/blocking/twofors.ae
index e0cfd16..63c439b 100644
--- a/parser/tests/blocking/twofors.ae
+++ b/parser/tests/blocking/twofors.ae
@@ -1,5 +1,5 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
int val = 0;
diff --git a/parser/tests/blocking/whilebreak.ae b/parser/tests/blocking/whilebreak.ae
index 8dde7f0..3a81e22 100644
--- a/parser/tests/blocking/whilebreak.ae
+++ b/parser/tests/blocking/whilebreak.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_whilebreak(void)
diff --git a/parser/tests/blocking/whilebreak2.ae b/parser/tests/blocking/whilebreak2.ae
index 07480d3..2518d96 100644
--- a/parser/tests/blocking/whilebreak2.ae
+++ b/parser/tests/blocking/whilebreak2.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_whilebreak(void)
diff --git a/parser/tests/blocking/whilebreak3.ae b/parser/tests/blocking/whilebreak3.ae
index 46007ea..7fe3680 100644
--- a/parser/tests/blocking/whilebreak3.ae
+++ b/parser/tests/blocking/whilebreak3.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_whilebreak(void)
diff --git a/parser/tests/blocking/whileloop.ae b/parser/tests/blocking/whileloop.ae
index 556b6ff..042bf68 100644
--- a/parser/tests/blocking/whileloop.ae
+++ b/parser/tests/blocking/whileloop.ae
@@ -1,4 +1,4 @@
-#include "aesop.h"
+#include <aesop/aesop.h>
#include "parser/tests/blocking/btest.hae"
static __blocking void run_whileloop(void)
diff --git a/resources/thread/test/aethread-cancel.ae b/resources/thread/test/aethread-cancel.ae
index 17c28a8..fff0d6e 100644
--- a/resources/thread/test/aethread-cancel.ae
+++ b/resources/thread/test/aethread-cancel.ae
@@ -3,10 +3,10 @@
#include <unistd.h>
#include <sys/time.h>
-#include "aesop.h"
-#include "resources/thread/aethread.hae"
-#include "resources/timer/timer.hae"
-#include "aesop-support.hae"
+#include <aesop/aesop.h>
+#include <aesop/aethread.hae>
+#include <aesop/timer.hae>
+#include <aesop/aesop-support.hae>
static double wtime(void)
{
diff --git a/resources/thread/test/aethread-example.ae b/resources/thread/test/aethread-example.ae
index 03d045e..69459e5 100644
--- a/resources/thread/test/aethread-example.ae
+++ b/resources/thread/test/aethread-example.ae
@@ -3,8 +3,8 @@
#include <unistd.h>
#include <sys/time.h>
-#include "aesop.h"
-#include "resources/thread/aethread.hae"
+#include <aesop/aesop.h>
+#include <aesop/aethread.hae>
static double wtime(void)
{
diff --git a/resources/timer/test/pthread-compare.ae b/resources/timer/test/pthread-compare.ae
index 9dbba25..c3ac84a 100644
--- a/resources/timer/test/pthread-compare.ae
+++ b/resources/timer/test/pthread-compare.ae
@@ -1,8 +1,8 @@
#include <unistd.h>
#include <sys/time.h>
-#include "aesop.h"
-#include "resources/timer/timer.hae"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
triton_mutex_t mutex = TRITON_MUTEX_INITIALIZER;
diff --git a/resources/timer/test/timer-cancel.ae b/resources/timer/test/timer-cancel.ae
index 647bdff..7c8c1bd 100644
--- a/resources/timer/test/timer-cancel.ae
+++ b/resources/timer/test/timer-cancel.ae
@@ -1,8 +1,8 @@
#include <stdio.h>
-#include "aesop.h"
-#include "resources/timer/timer.hae"
-#include "aesop-support.hae"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
+#include <aesop/aesop-support.hae>
static __blocking int dotimer(void)
{
diff --git a/resources/timer/test/timer1.ae b/resources/timer/test/timer1.ae
index a8183ca..5a4f283 100644
--- a/resources/timer/test/timer1.ae
+++ b/resources/timer/test/timer1.ae
@@ -1,7 +1,7 @@
#include <stdio.h>
-#include "aesop.h"
-#include "resources/timer/timer.hae"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
static __blocking int dotimer(void)
{
diff --git a/resources/timer/test/timer2.ae b/resources/timer/test/timer2.ae
index d18b139..2f053c6 100644
--- a/resources/timer/test/timer2.ae
+++ b/resources/timer/test/timer2.ae
@@ -1,7 +1,7 @@
#include <stdio.h>
-#include "aesop.h"
-#include "resources/timer/timer.hae"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
int exit_loop = 0;
diff --git a/src/aefile/test/aefile-example.ae b/src/aefile/test/aefile-example.ae
index 7f83c20..221a2ea 100644
--- a/src/aefile/test/aefile-example.ae
+++ b/src/aefile/test/aefile-example.ae
@@ -7,9 +7,9 @@
#include <fcntl.h>
#include <stdlib.h>
-#include "aesop.h"
-#include "src/aefile/aefile.hae"
-#include "resources/thread/aethread.hae"
+#include <aesop/aesop.h>
+#include <aesop/aefile.hae>
+#include <aesop/aethread.hae>
static double wtime(void)
{
diff --git a/src/c-utils b/src/c-utils
index 7f4af54..33877b0 160000
--- a/src/c-utils
+++ b/src/c-utils
@@ -1 +1 @@
-Subproject commit 7f4af54f5af9a97f346cfb1d8fc122b1f2203178
+Subproject commit 33877b08245dc805447c83fcdf349a4cab227031
diff --git a/src/socket/aesocket.hae b/src/socket/aesocket.hae
index 55db9ac..3be3276 100644
--- a/src/socket/aesocket.hae
+++ b/src/socket/aesocket.hae
@@ -3,7 +3,7 @@
#include <sys/types.h>
#include <sys/socket.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
/**
diff --git a/src/socket/module.mk.in b/src/socket/module.mk.in
index 1b86cbb..1fe4808 100644
--- a/src/socket/module.mk.in
+++ b/src/socket/module.mk.in
@@ -2,4 +2,5 @@ DIR := src/socket
AELIBSRC += $(DIR)/aesocket.ae
AESOP_HDR += $(DIR)/aesocket.hae
+INSTALL_HDR += $(DIR)/aesocket.hae
diff --git a/src/socket/test/simple.ae b/src/socket/test/simple.ae
index 2a68033..697d7cd 100644
--- a/src/socket/test/simple.ae
+++ b/src/socket/test/simple.ae
@@ -1,7 +1,7 @@
-#include "aesop.h"
-#include "aesop-support.hae"
-#include "resources/timer/timer.hae"
-#include "src/socket/aesocket.hae"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
+#include <aesop/timer.hae>
+#include <aesop/aesocket.hae>
#include <unistd.h>
#include <fcntl.h>
diff --git a/src/ssm/test/ssmget.ae b/src/ssm/test/ssmget.ae
index 9afebe8..23806f6 100644
--- a/src/ssm/test/ssmget.ae
+++ b/src/ssm/test/ssmget.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
-#include "aesop-support.hae"
-#include "src/ssm/aessm.hae"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
+#include <aesop/aessm.hae>
#define DATAVAL 0xffbaffabffbaffab
diff --git a/src/ssm/test/ssmmsg.ae b/src/ssm/test/ssmmsg.ae
index 5c23dd9..0fa0655 100644
--- a/src/ssm/test/ssmmsg.ae
+++ b/src/ssm/test/ssmmsg.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
-#include "aesop-support.hae"
-#include "src/ssm/aessm.hae"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
+#include <aesop/aessm.hae>
#define DATAVAL 0xffbaffabffbaffab
diff --git a/src/ssm/test/ssmping.ae b/src/ssm/test/ssmping.ae
index 5f511d4..be78bbb 100644
--- a/src/ssm/test/ssmping.ae
+++ b/src/ssm/test/ssmping.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
-#include "aesop-support.hae"
-#include "src/ssm/aessm.hae"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
+#include <aesop/aessm.hae>
/*
* This test demonstrates a ping to a remote host.
diff --git a/src/ssm/test/ssmput.ae b/src/ssm/test/ssmput.ae
index 4d58d77..431c040 100644
--- a/src/ssm/test/ssmput.ae
+++ b/src/ssm/test/ssmput.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
-#include "aesop-support.hae"
-#include "src/ssm/aessm.hae"
+#include <aesop/aesop.h>
+#include <aesop/aesop-support.hae>
+#include <aesop/aessm.hae>
#define DATAVAL 0xffbaffabffbaffab
diff --git a/tests/test-hints.ae b/tests/test-hints.ae
index 28b9de6..c0df784 100644
--- a/tests/test-hints.ae
+++ b/tests/test-hints.ae
@@ -1,6 +1,6 @@
-#include "aesop.h"
-#include "resources/timer/timer.hae"
+#include <aesop/aesop.h>
+#include <aesop/timer.hae>
__blocking void do_blocking3(void)
{
hooks/post-receive
--
aesop Repository
1
0
aesop Repository branch, master, updated. 4f797c1277d3fb7a83222119351bfff6478ce4d5
by noreply@mcs.anl.gov 26 Mar '12
by noreply@mcs.anl.gov 26 Mar '12
26 Mar '12
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "aesop Repository".
The branch, master has been updated
via 4f797c1277d3fb7a83222119351bfff6478ce4d5 (commit)
via b700e83bbe63654a94dc480291fe6432a10af76e (commit)
via 5b6fa8974a5725fb7502d55d2b3e179416ec3efe (commit)
via c8cacb28c8961d7decb0468efd2000ff0d1b989f (commit)
via 97a0592e56c1645bd5213a85ac2bf2e6408b0ca0 (commit)
via 8a9a6144639749e2c2a5ce54db23b53c0ef155b3 (commit)
via e8579e02b2911193f9aca8aaa94b99995341df1a (commit)
via cca6ba6caf0bb267cc5eddbf88db2b89e722bf7e (commit)
via a0d4dcb8f30435276a5047a643fdd05a3ac46d13 (commit)
via 9eff311e9f8b537598f7832cbb91dacafe535598 (commit)
via c20d9d3e99de35eb7d5a53fc5ec2cebe5baf1dab (commit)
via f7714356368c55866934b58be52359a1b303c6cd (commit)
via 5ba22a064b477db36835dc15714e0cc26eaf54fd (commit)
via 588b8d34781081c188edb57412447330701fc186 (commit)
from 8fd3b4619b2c5b0d6e230c0b243d4824eb07551c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4f797c1277d3fb7a83222119351bfff6478ce4d5
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 15:54:26 2012 -0400
adjust header path in parser
commit b700e83bbe63654a94dc480291fe6432a10af76e
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 15:50:51 2012 -0400
install resource headers
commit 5b6fa8974a5725fb7502d55d2b3e179416ec3efe
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 15:39:57 2012 -0400
fix include path
commit c8cacb28c8961d7decb0468efd2000ff0d1b989f
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 15:34:36 2012 -0400
reorganizing various headers
- some resource.h functionality moved to aesop.h
- reduced set of installed headers
- installed headers are self-sufficient (no references back to tree)
- various other assorted cleanups
commit 97a0592e56c1645bd5213a85ac2bf2e6408b0ca0
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 15:24:16 2012 -0400
update c-utils
commit 8a9a6144639749e2c2a5ce54db23b53c0ef155b3
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 14:55:19 2012 -0400
new version of c-utils
commit e8579e02b2911193f9aca8aaa94b99995341df1a
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 14:29:10 2012 -0400
update to new c-utils
commit cca6ba6caf0bb267cc5eddbf88db2b89e722bf7e
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 14:02:17 2012 -0400
remove op.h from installed headers
commit a0d4dcb8f30435276a5047a643fdd05a3ac46d13
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 13:59:39 2012 -0400
remove opcache.h from installed headers
commit 9eff311e9f8b537598f7832cbb91dacafe535598
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 13:48:10 2012 -0400
still tinkering with symlinks
commit c20d9d3e99de35eb7d5a53fc5ec2cebe5baf1dab
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 13:14:58 2012 -0400
force symlink
commit f7714356368c55866934b58be52359a1b303c6cd
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 13:13:36 2012 -0400
force symlink
commit 5ba22a064b477db36835dc15714e0cc26eaf54fd
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 11:36:43 2012 -0400
build-tree symlinks to headers to be installed
commit 588b8d34781081c188edb57412447330701fc186
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 10:59:34 2012 -0400
variable to track headers to install
-----------------------------------------------------------------------
Summary of changes:
Makefile.in | 44 +++---
ae-blocking-parser.h | 8 +-
ae-ctl.h | 10 +-
ae-types.h | 5 +-
aesop.h | 211 +++++++++++++++++++++++++--
hints.h | 6 +-
module.mk.in | 10 +-
parser/ae-blocking-parser.lhs | 4 +-
parser/tests/blocking/btest-impl.c | 2 +
resource.h | 200 +------------------------
resources/resourcebuilder/module.mk.in | 2 +
resources/resourcebuilder/resourcebuilder.c | 1 +
resources/thread/aethread.c | 1 +
resources/thread/aethread.hae | 2 +-
resources/thread/module.mk.in | 2 +
resources/timer/module.mk.in | 2 +
resources/timer/timer.c | 1 +
resources/timer/timer.hae | 2 +-
src/aefile/aefile.ae | 1 +
src/aefile/aefile.hae | 2 +-
src/aefile/module.mk.in | 2 +
src/c-utils | 2 +-
src/ssm/module.mk.in | 1 +
23 files changed, 274 insertions(+), 247 deletions(-)
Diff of changes:
diff --git a/Makefile.in b/Makefile.in
index 9b08410..b653aba 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -78,7 +78,7 @@ ifeq ($(BUILD_SSM),1)
LIBS += -lssm_ref -lssmp_mpi
endif
-CFLAGS= -I$(srcdir)/src/c-utils -I$(srcdir)/include -I. -I src/c-utils -I$(srcdir) @CFLAGS@ $(CPPFLAGS)
+CFLAGS= -I$(srcdir)/src/c-utils -I$(srcdir)/include -I. -Iinclude -I src/c-utils -I$(srcdir) @CFLAGS@ $(CPPFLAGS)
# enable relocatable
#CFLAGS += -fPIC
@@ -131,6 +131,7 @@ GENLIBHDR :=
AETESTSRC :=
AEPROGRAMSRC :=
AESOP_HDR :=
+INSTALL_HDR :=
AETESTLIBSRC :=
TESTLIBSRC :=
HSSRC :=
@@ -435,7 +436,7 @@ $(GENLIBOBJS) $(LIBOBJS) $(TESTOBJS): %.o: %.c
$(call MODCFLAGS_C,$*) $<
# Auto-generated dependencies for .c files
-$(LIBDEPS) $(GENLIBDEPS) $(TESTDEPS) $(TESTLIBDEPS): %.d: %.c
+$(LIBDEPS) $(GENLIBDEPS) $(TESTDEPS) $(TESTLIBDEPS): %.d: %.c in_tree_include
$(Q) " DEP $@"
$(E)CC=$(call MCC_C,$*) $(srcdir)/maint/depend.sh $(call dirname,$*) $(LIBCFLAGS) $(CFLAGS) $(call MODCFLAGS_C,$*) $< > $@
@@ -496,7 +497,7 @@ $(AEOBJS): %.o: $(HSBIN) %.ae
-- $(LIBCFLAGS) $(CFLAGS) $(CWARNS) $(call MODCFLAGS_AE,$*)
# Auto-generated dependencies for .ae files
-$(AEDEPS): %.ae.d: %.ae
+$(AEDEPS): %.ae.d: %.ae in_tree_include
$(Q) " DEP $@"
$(E)CC=$(call MCC_C,$*) $(srcdir)/maint/depend-ae.sh $(call dirname,$*) $(srcdir) $(LIBCFLAGS) $(CFLAGS) $(call MODCFLAGS_C,$*) $< > $@
@@ -510,7 +511,7 @@ $(AESOP_TRHDR): %.h: %.hae $(HSBIN)
-j -c $(call MCC_AE,$*) $(VA) $(DA) $(AEPRETTY) \
-- $(LIBCFLAGS) $(CFLAGS) $(CWARNS) $(call MODCFLAGS_AE,$*)
-$(AESOP_TRHDR_DEPS): %.h.d: %.hae
+$(AESOP_TRHDR_DEPS): %.h.d: %.hae in_tree_include
$(Q) " DEP $@"
$(E)CC=$(call MCC_C,$*) $(srcdir)/maint/depend-hae.sh $(call dirname,$*) $(srcdir) $(LIBCFLAGS) $(CFLAGS) $(call MODCFLAGS_C,$*) $< > $@
@@ -671,6 +672,25 @@ doc: $(DOCPDF)
docshtml: $(DOCHTML)
dochtml: $(DOCHTML)
+# manually add some c-utils headers to the install list
+
+INSTALL_HDR += src/c-utils/triton-list.h \
+ src/c-utils/triton-thread.h \
+ src/c-utils/triton-base.h \
+ src/c-utils/triton-uint128.h
+
+INSTALL_HDR_SRC=$(patsubst %,$(abs_srcdir)/%,$(INSTALL_HDR))
+
+.PHONY: in_tree_include include/aesop
+
+in_tree_include: include/aesop
+
+include/aesop:
+ mkdir -p include/aesop
+ for hdr in $(INSTALL_HDR_SRC); do \
+ ln -s $$hdr include/aesop 2> /dev/null; \
+ done
+
install:: all
install -d $(bindir)
install -d $(libdir)
@@ -678,18 +698,4 @@ install:: all
install -m 755 bin/aecc $(bindir)
install -m 755 bin/aecc-utils $(bindir)
install -m 644 lib/libaesop.* $(libdir)
- install -m 644 $(srcdir)/src/c-utils/triton-list.h $(includedir)
- install -m 644 $(srcdir)/ae-types.h $(includedir)
- install -m 644 $(srcdir)/ae-ctl.h $(includedir)
- install -m 644 $(srcdir)/ae-log.h $(includedir)
- install -m 644 $(srcdir)/aesop.h $(includedir)
- install -m 644 $(srcdir)/ae-error.h $(includedir)
- install -m 644 $(srcdir)/ae-blocking-parser.h $(includedir)
- install -m 644 $(srcdir)/resource.h $(includedir)
- install -m 644 $(srcdir)/hints.h $(includedir)
- install -m 644 $(srcdir)/opcache.h $(includedir)
- install -m 644 $(srcdir)/ae-init.h $(includedir)
- install -m 644 $(srcdir)/src/c-utils/triton-thread.h $(includedir)
- install -m 644 $(srcdir)/src/c-utils/triton-base.h $(includedir)
- install -m 644 $(srcdir)/ae-debug.h $(includedir)
- install -m 644 $(srcdir)/op.h $(includedir)
+ install -m 644 $(INSTALL_HDR_SRC) $(includedir)
diff --git a/ae-blocking-parser.h b/ae-blocking-parser.h
index f744294..a044b05 100644
--- a/ae-blocking-parser.h
+++ b/ae-blocking-parser.h
@@ -8,10 +8,10 @@
* either a C statement, a C declaration, or a C expression.
*/
-#include "aesop.h"
-#include "ae-error.h"
-#include "ae-log.h"
-#include "ae-debug.h"
+#include <aesop/aesop.h>
+#include <aesop/ae-error.h>
+#include <aesop/ae-log.h>
+#include <aesop/ae-debug.h>
#define AE_MK_START_OF_BLOCKING(__fname__) \
ae_debug_blocking("[START]: %s (%p)\n", #__fname__, __ae_ctl);
diff --git a/ae-ctl.h b/ae-ctl.h
index 18b0bdf..4e27594 100644
--- a/ae-ctl.h
+++ b/ae-ctl.h
@@ -1,11 +1,11 @@
#ifndef __AE_CTL_H__
#define __AE_CTL_H__
-#include "ae-types.h"
-#include "src/c-utils/triton-thread.h"
-#include "src/c-utils/triton-list.h"
-#include "ae-error.h"
-#include "hints.h"
+#include <aesop/triton-thread.h>
+#include <aesop/triton-list.h>
+#include <aesop/ae-types.h>
+#include <aesop/ae-error.h>
+#include <aesop/hints.h>
#include <opa_primitives.h>
diff --git a/ae-types.h b/ae-types.h
index f880957..4fcdeb1 100644
--- a/ae-types.h
+++ b/ae-types.h
@@ -7,8 +7,7 @@
* want to use Triton.
*/
-#include "triton-string.h"
-#include "triton-uint128.h"
+#include <aesop/triton-uint128.h>
#define ae_op_id_t uint128_t
#define ae_op_id_clear triton_uint128_setzero
@@ -17,6 +16,4 @@
#define ae_op_id_equal(id1, id2) !memcmp(&id1, &id2, sizeof(ae_op_id_t))
-#define ae_string_t triton_string_t
-
#endif
diff --git a/aesop.h b/aesop.h
index 511e798..89276a4 100644
--- a/aesop.h
+++ b/aesop.h
@@ -1,17 +1,14 @@
#ifndef __AESOP_H__
#define __AESOP_H__
-#include "src/c-utils/triton-base.h"
-#include "ae-error.h"
-#include "src/c-utils/triton-list.h"
-#include "src/c-utils/triton-thread.h"
-#include "ae-log.h"
-#include "ae-debug.h"
-
-#include "resource.h"
-#include "op.h"
-#include "opcache.h"
-
+#include <aesop/triton-base.h>
+#include <aesop/triton-list.h>
+#include <aesop/triton-thread.h>
+#include <aesop/ae-error.h>
+#include <aesop/ae-log.h>
+#include <aesop/ae-debug.h>
+#include <aesop/ae-ctl.h>
+#include <aesop/triton-uint128.h>
int aesop_init(const char *resource_list);
void aesop_finalize(void);
@@ -19,4 +16,196 @@ void aesop_finalize(void);
int aesop_set_config(const char* key, const char* value);
int aesop_set_debugging(const char* resource, int value);
+/* ae_post_blocking allows us to post a blocking function from normal C code and if we're doing a syntax
+ * check with the normal compiler (GCC), we don't get a 'too many arguments to function' error.
+ */
+#ifdef AESOP_PARSER
+#define ae_post_blocking(__fname, __callback, __user_ptr, __hints, __resource_ctx, __op_id, __fargs...) \
+ __fname(__callback, __user_ptr, __hints, __resource_ctx, __op_id, 0, ##__fargs)
+#else
+#define ae_post_blocking(__fname, __callback, __user_ptr, __hints, __resource_ctx, __op_id, __fargs...) AE_SUCCESS
+#endif
+
+#define ext_post_blocking(__fname, __callback, __user_ptr, __hints, __resource_ctx, __op_id, __fargs...) \
+ __fname(__callback, __user_ptr, __hints, __resource_ctx, __op_id, 0, ##__fargs)
+
+/* Called by c programs to break ae_poll() calls once callbacks are complete */
+void ae_poll_break(ae_context_t context);
+
+/* Contexts are created to allow separation of polling for different logical
+ * groups of operations. Don't use this function. Instead, use the associated
+ * ae_context_create macro.
+ */
+int _ae_context_create(ae_context_t *context, const char *format, int resource_count, ...) __attribute__((format (printf, 2, 4))) ;
+
+/* macro to calculate the number of resources passed in as string
+ * arguments so we don't have to pass in the count explicitly. */
+#define ae_context_create(_context, ...) \
+ _ae_context_create(_context, FORMAT_ARGS(__VA_ARGS__) , ##__VA_ARGS__)
+
+/* Context destruction. Called to cleanup state allocated in ae_context_create.
+ */
+int ae_context_destroy(ae_context_t context);
+
+/* Poll for completion of the operations within the given context up to a
+ * timeout value.
+ */
+int ae_poll(ae_context_t context, int ms);
+
+int ae_cancel_branches(struct ae_ctl *ctl);
+
+int ae_count_branches(struct ae_ctl *ctl);
+
+#ifdef AESOP_PARSER
+#define aesop_cancel_branches() ae_cancel_branches(__ae_ctl->parent ? &__ae_ctl->parent->gen : NULL)
+#define aesop_count_branches() ae_count_branches(__ae_ctl->parent ? &__ae_ctl->parent->gen : NULL)
+#else
+static inline int aesop_cancel_branches(void) { return AE_ERR_SYSTEM; }
+static inline int aesop_count_branches(void) { return -1; }
+#endif
+
+/* Set this to zero to cause the main_set macros to busy spin on ae_poll(),
+ * although this probably is not a good idea.
+ */
+#define AESOP_MAIN_SET_POLL_TIMEOUT 100
+
+/* A macro to implement the boilerplate main function that posts an initial
+ * blocking function. The blocking function should have the same signature as main().
+ * The variable parameters are the const char * names of the resources to initialize
+ * for the context. In this macro, ae_init() is called with no parameters, so
+ * all modules get initialized.
+ *
+ * Example:
+ * __blocking int aesop_main(int argc, char **argv) { ... }
+ * aesop_main_set(aesop_main, "timer", "bdb", "sched");
+ */
+#define aesop_main_set(__main_blocking_function__, ...) \
+static int __main_done=0; \
+static int __main_ret; \
+static void __main_cb(void *user_ptr, int t) \
+{ \
+ ae_context_t ctx = (ae_context_t)user_ptr; \
+ __main_done = 1; \
+ __main_ret = t; \
+ ae_poll_break(ctx); \
+} \
+int main(int argc, char **argv) \
+{ \
+ ae_context_t __main_ctx = NULL; \
+ ae_hints_t __main_hints; \
+ ae_op_id_t __main_opid; \
+ int ret; \
+ ret = aesop_init(""); \
+ aesop_error_assert(ret); \
+ if(COUNT_ARGS(__VA_ARGS__) > 0) \
+ { \
+ ret = ae_context_create(&__main_ctx, ##__VA_ARGS__); \
+ aesop_error_assert(ret); \
+ } \
+ ret = ae_hints_init(&__main_hints); \
+ assert(ret == 0); \
+ ret = ae_post_blocking( \
+ __main_blocking_function__, \
+ __main_cb, \
+ __main_ctx, \
+ &__main_hints, \
+ __main_ctx, \
+ &__main_opid, \
+ &__main_ret, \
+ argc, \
+ argv); \
+ if(ret == AE_SUCCESS) \
+ { \
+ while(!__main_done) \
+ { \
+ ret = ae_poll(__main_ctx, AESOP_MAIN_SET_POLL_TIMEOUT); \
+ if(ret == AE_ERR_TIMEDOUT) continue; \
+ aesop_error_assert(ret); \
+ } \
+ } \
+ aesop_error_assert(ret); \
+ ae_hints_destroy(&__main_hints); \
+ if(COUNT_ARGS(__VA_ARGS__) > 0) \
+ { \
+ ae_context_destroy(__main_ctx); \
+ } \
+ aesop_finalize(); \
+ return __main_ret; \
+}
+
+/* Similar to above, but this one takes an initialization function
+ * that gets called before ae_init,
+ * and a single string to specify the aesop module to initialize.
+ *
+ * Example:
+ *
+ * __blocking int aesop_main(int argc, char **argv) { ... }
+ * int set_zeroconf_params(void) { ... }
+ * aesop_main_set_with_init(set_zeroconf_params, "aesop.client", aesop_main, "bdb", "file");
+ */
+#define aesop_main_set_with_init(__init_before_main__, \
+ __resource_list__, \
+ __main_blocking_function__, ...) \
+static int __main_done=0; \
+static int __main_ret; \
+static void __main_cb(void *user_ptr, int t) \
+{ \
+ ae_context_t ctx = (ae_context_t)user_ptr; \
+ __main_done = 1; \
+ __main_ret = t; \
+ ae_poll_break(ctx); \
+} \
+int main(int argc, char **argv) \
+{ \
+ ae_context_t __main_ctx = NULL; \
+ ae_hints_t __main_hints; \
+ ae_op_id_t __main_opid; \
+ int ret; \
+ int (*__main_init_func)(void) = __init_before_main__; \
+ if(__init_before_main__) \
+ { \
+ ret = __main_init_func(); \
+ aesop_error_assert(ret); \
+ } \
+ ret = aesop_init(__resource_list__); \
+ aesop_error_assert(ret); \
+ if(COUNT_ARGS(__VA_ARGS__) > 0) \
+ { \
+ ret = ae_context_create(&__main_ctx, ##__VA_ARGS__); \
+ aesop_error_assert(ret); \
+ } \
+ ret = ae_hints_init(&__main_hints); \
+ assert(ret == 0); \
+ ret = ae_post_blocking( \
+ __main_blocking_function__, \
+ __main_cb, \
+ __main_ctx, \
+ &__main_hints, \
+ __main_ctx, \
+ &__main_opid, \
+ &__main_ret, \
+ argc, \
+ argv); \
+ if(ret == AE_SUCCESS) \
+ { \
+ while(!__main_done) \
+ { \
+ ret = ae_poll(__main_ctx, AESOP_MAIN_SET_POLL_TIMEOUT); \
+ if(ret == AE_ERR_TIMEDOUT) continue; \
+ aesop_error_assert(ret); \
+ } \
+ } \
+ aesop_error_assert(ret); \
+ ae_hints_destroy(&__main_hints); \
+ if(COUNT_ARGS(__VA_ARGS__) > 0) \
+ { \
+ ae_context_destroy(__main_ctx); \
+ } \
+ aesop_finalize(); \
+ return __main_ret; \
+}
+
+ae_op_id_t ae_id_gen(int resource_id, intptr_t ptr);
+intptr_t ae_id_lookup(ae_op_id_t id, int *resource_id);
+
#endif
diff --git a/hints.h b/hints.h
index cd0d4f8..5c3d17e 100644
--- a/hints.h
+++ b/hints.h
@@ -1,9 +1,9 @@
#ifndef __AE_HINTS_H__
#define __AE_HINTS_H__
-#include "src/c-utils/triton-base.h"
-#include "src/c-utils/triton-list.h"
-#include "src/c-utils/triton-thread.h"
+#include <aesop/triton-base.h>
+#include <aesop/triton-list.h>
+#include <aesop/triton-thread.h>
struct ae_hints
{
diff --git a/module.mk.in b/module.mk.in
index c48b173..ffe87c5 100644
--- a/module.mk.in
+++ b/module.mk.in
@@ -7,4 +7,12 @@ LIBSRC += opcache.c \
ae-ctl.c \
ae-init.c
-
+INSTALL_HDR += ae-types.h \
+ ae-ctl.h \
+ ae-log.h \
+ aesop.h \
+ ae-error.h \
+ ae-blocking-parser.h \
+ hints.h \
+ ae-init.h \
+ ae-debug.h
diff --git a/parser/ae-blocking-parser.lhs b/parser/ae-blocking-parser.lhs
index fd210ec..bacb30f 100644
--- a/parser/ae-blocking-parser.lhs
+++ b/parser/ae-blocking-parser.lhs
@@ -1364,7 +1364,7 @@ a BlockingContext as we go along
> let r = if isJust report then fromJust report else headerfile
> ctu <- generateAST headerfile
> let tdIdents = getTypeDefIdents ctu
-> w <- newWalkerState debug r compiler "ae-blocking-parser.h" gccopts tdIdents
+> w <- newWalkerState debug r compiler "aesop/ae-blocking-parser.h" gccopts tdIdents
> (pairs, w) <- runStateT (getBlockingHeaderDecls ctu) w
> writeFile outfile "\n\n/* This is an auto-generated file created by the ae-blocking-parser tool. DO NOT MODIFY! */\n\n"
> outputHeader r outfile pairs
@@ -1390,7 +1390,7 @@ a BlockingContext as we go along
> let r = if isJust report then fromJust report else f
> ctu <- generateAST f
> let typeDefIdents = getTypeDefIdents ctu
-> w <- newWalkerState debug r compiler "ae-blocking-parser.h" gccopts typeDefIdents
+> w <- newWalkerState debug r compiler "aesop/ae-blocking-parser.h" gccopts typeDefIdents
> let extDecls (CTranslUnit d _) = d
> let (preBlockingCTU, mainCTU) = splitExtDeclsAtAesop ctu
> let (CTranslUnit mainExtDecls _) = mainCTU
diff --git a/parser/tests/blocking/btest-impl.c b/parser/tests/blocking/btest-impl.c
index 20e0f53..1503ec3 100644
--- a/parser/tests/blocking/btest-impl.c
+++ b/parser/tests/blocking/btest-impl.c
@@ -6,7 +6,9 @@
#include <pthread.h>
#include "aesop.h"
#include "triton-list.h"
+#include "opcache.h"
#include "parser/tests/blocking/btest.h"
+#include "resource.h"
#define RESOURCE_NAME "btest"
diff --git a/resource.h b/resource.h
index 7f68ddd..4b9065c 100644
--- a/resource.h
+++ b/resource.h
@@ -2,11 +2,13 @@
#define __RESOURCE_H__
#include "ae-types.h"
-#include "src/c-utils/triton-thread.h"
-#include "src/c-utils/triton-list.h"
#include "ae-error.h"
#include "ae-ctl.h"
#include "hints.h"
+#include "src/c-utils/triton-uint128.h"
+#include "src/c-utils/triton-thread.h"
+#include "src/c-utils/triton-list.h"
+#include "src/c-utils/triton-string.h"
#define AE_MAX_RESOURCES 255
#define AE_MAX_CONTEXTS 1024
@@ -15,18 +17,6 @@
#define AE_GET_RESOURCE_MASK(resource_id) (AE_RESOURCE_MASK&(((uint64_t)resource_id)<<56))
#define AE_GET_RESOURCE_ID(op_id) (((op_id&AE_RESOURCE_MASK)>>56)&0xFF)
-/* ae_post_blocking allows us to post a blocking function from normal C code and if we're doing a syntax
- * check with the normal compiler (GCC), we don't get a 'too many arguments to function' error.
- */
-#ifdef AESOP_PARSER
-#define ae_post_blocking(__fname, __callback, __user_ptr, __hints, __resource_ctx, __op_id, __fargs...) \
- __fname(__callback, __user_ptr, __hints, __resource_ctx, __op_id, 0, ##__fargs)
-#else
-#define ae_post_blocking(__fname, __callback, __user_ptr, __hints, __resource_ctx, __op_id, __fargs...) AE_SUCCESS
-#endif
-
-#define ext_post_blocking(__fname, __callback, __user_ptr, __hints, __resource_ctx, __op_id, __fargs...) \
- __fname(__callback, __user_ptr, __hints, __resource_ctx, __op_id, 0, ##__fargs)
#define ae_define_post(__ret_type, __fname, __fargs...) \
int __fname(void (*__ae_callback)(void *ptr, __ret_type ret), \
@@ -43,9 +33,6 @@ int ae_check_debug_flag(int resource_id);
#define ae_debug(__resource_id, __format, ...) \
if(ae_check_debug_flag(__resource_id)) fprintf(stderr, __format, ## __VA_ARGS__)
-ae_op_id_t ae_id_gen(int resource_id, intptr_t ptr);
-intptr_t ae_id_lookup(ae_op_id_t id, int *resource_id);
-
/* this structure defines a configuration parameter for a resource */
struct ae_resource_config
{
@@ -89,58 +76,23 @@ void ae_resource_unregister(int resource_id);
/* Called by resources to request polling from the event loop */
void ae_resource_request_poll(ae_context_t context, int resource_id);
-/* Called by c programs to break ae_poll() calls once callbacks are complete */
-void ae_poll_break(ae_context_t context);
/* this function is used by resources that want access to the event loop
* used by aesop for this context
*/
struct ev_loop * ae_resource_get_eloop(ae_context_t context);
-/* Contexts are created to allow separation of polling for different logical
- * groups of operations. Don't use this function. Instead, use the associated
- * ae_context_create macro.
- */
-int _ae_context_create(ae_context_t *context, const char *format, int resource_count, ...) __attribute__((format (printf, 2, 4))) ;
-
-/* macro to calculate the number of resources passed in as string
- * arguments so we don't have to pass in the count explicitly. */
-#define ae_context_create(_context, ...) \
- _ae_context_create(_context, FORMAT_ARGS(__VA_ARGS__) , ##__VA_ARGS__)
-
-/* Context destruction. Called to cleanup state allocated in ae_context_create.
- */
-int ae_context_destroy(ae_context_t context);
-
-/* Poll for completion of the operations within the given context up to a
- * timeout value.
- */
-int ae_poll(ae_context_t context, int ms);
-
/* Cancel an operation */
int ae_cancel_op(ae_context_t context, ae_op_id_t op_id);
void ae_backtrace(void);
-int ae_cancel_branches(struct ae_ctl *ctl);
-
-int ae_count_branches(struct ae_ctl *ctl);
-
-void ae_get_stack(struct ae_ctl *ctl, ae_string_t *stack, int *inout_count);
-
-#ifdef AESOP_PARSER
-#define aesop_cancel_branches() ae_cancel_branches(__ae_ctl->parent ? &__ae_ctl->parent->gen : NULL)
-#define aesop_count_branches() ae_count_branches(__ae_ctl->parent ? &__ae_ctl->parent->gen : NULL)
-#else
-static inline int aesop_cancel_branches(void) { return AE_ERR_SYSTEM; }
-static inline int aesop_count_branches(void) { return -1; }
-#endif
-
+void ae_get_stack(struct ae_ctl *ctl, triton_string_t *stack, int *inout_count);
void ae_print_stack(FILE *outstream, struct ae_ctl *ctl);
#ifdef AESOP_PARSER
#define aesop_get_stack(stack, io_count) ae_get_stack(&__ae_ctl->gen, stack, io_count)
#else
-static inline void aesop_get_stack(ae_string_t *strings, int *inout_count)
+static inline void aesop_get_stack(triton_string_t *strings, int *inout_count)
{
*inout_count = 0;
}
@@ -152,146 +104,6 @@ static inline void aesop_get_stack(ae_string_t *strings, int *inout_count)
static inline void aesop_print_stack(FILE *stream) { }
#endif
-/* Set this to zero to cause the main_set macros to busy spin on ae_poll(),
- * although this probably is not a good idea.
- */
-#define AESOP_MAIN_SET_POLL_TIMEOUT 100
-
-/* A macro to implement the boilerplate main function that posts an initial
- * blocking function. The blocking function should have the same signature as main().
- * The variable parameters are the const char * names of the resources to initialize
- * for the context. In this macro, ae_init() is called with no parameters, so
- * all modules get initialized.
- *
- * Example:
- * __blocking int aesop_main(int argc, char **argv) { ... }
- * aesop_main_set(aesop_main, "timer", "bdb", "sched");
- */
-#define aesop_main_set(__main_blocking_function__, ...) \
-static int __main_done=0; \
-static int __main_ret; \
-static void __main_cb(void *user_ptr, int t) \
-{ \
- ae_context_t ctx = (ae_context_t)user_ptr; \
- __main_done = 1; \
- __main_ret = t; \
- ae_poll_break(ctx); \
-} \
-int main(int argc, char **argv) \
-{ \
- ae_context_t __main_ctx = NULL; \
- ae_hints_t __main_hints; \
- ae_op_id_t __main_opid; \
- int ret; \
- ret = aesop_init(""); \
- aesop_error_assert(ret); \
- if(COUNT_ARGS(__VA_ARGS__) > 0) \
- { \
- ret = ae_context_create(&__main_ctx, ##__VA_ARGS__); \
- aesop_error_assert(ret); \
- } \
- ret = ae_hints_init(&__main_hints); \
- assert(ret == 0); \
- ret = ae_post_blocking( \
- __main_blocking_function__, \
- __main_cb, \
- __main_ctx, \
- &__main_hints, \
- __main_ctx, \
- &__main_opid, \
- &__main_ret, \
- argc, \
- argv); \
- if(ret == AE_SUCCESS) \
- { \
- while(!__main_done) \
- { \
- ret = ae_poll(__main_ctx, AESOP_MAIN_SET_POLL_TIMEOUT); \
- if(ret == AE_ERR_TIMEDOUT) continue; \
- aesop_error_assert(ret); \
- } \
- } \
- aesop_error_assert(ret); \
- ae_hints_destroy(&__main_hints); \
- if(COUNT_ARGS(__VA_ARGS__) > 0) \
- { \
- ae_context_destroy(__main_ctx); \
- } \
- aesop_finalize(); \
- return __main_ret; \
-}
-
-/* Similar to above, but this one takes an initialization function
- * that gets called before ae_init,
- * and a single string to specify the aesop module to initialize.
- *
- * Example:
- *
- * __blocking int aesop_main(int argc, char **argv) { ... }
- * int set_zeroconf_params(void) { ... }
- * aesop_main_set_with_init(set_zeroconf_params, "aesop.client", aesop_main, "bdb", "file");
- */
-#define aesop_main_set_with_init(__init_before_main__, \
- __resource_list__, \
- __main_blocking_function__, ...) \
-static int __main_done=0; \
-static int __main_ret; \
-static void __main_cb(void *user_ptr, int t) \
-{ \
- ae_context_t ctx = (ae_context_t)user_ptr; \
- __main_done = 1; \
- __main_ret = t; \
- ae_poll_break(ctx); \
-} \
-int main(int argc, char **argv) \
-{ \
- ae_context_t __main_ctx = NULL; \
- ae_hints_t __main_hints; \
- ae_op_id_t __main_opid; \
- int ret; \
- int (*__main_init_func)(void) = __init_before_main__; \
- if(__init_before_main__) \
- { \
- ret = __main_init_func(); \
- aesop_error_assert(ret); \
- } \
- ret = aesop_init(__resource_list__); \
- aesop_error_assert(ret); \
- if(COUNT_ARGS(__VA_ARGS__) > 0) \
- { \
- ret = ae_context_create(&__main_ctx, ##__VA_ARGS__); \
- aesop_error_assert(ret); \
- } \
- ret = ae_hints_init(&__main_hints); \
- assert(ret == 0); \
- ret = ae_post_blocking( \
- __main_blocking_function__, \
- __main_cb, \
- __main_ctx, \
- &__main_hints, \
- __main_ctx, \
- &__main_opid, \
- &__main_ret, \
- argc, \
- argv); \
- if(ret == AE_SUCCESS) \
- { \
- while(!__main_done) \
- { \
- ret = ae_poll(__main_ctx, AESOP_MAIN_SET_POLL_TIMEOUT); \
- if(ret == AE_ERR_TIMEDOUT) continue; \
- aesop_error_assert(ret); \
- } \
- } \
- aesop_error_assert(ret); \
- ae_hints_destroy(&__main_hints); \
- if(COUNT_ARGS(__VA_ARGS__) > 0) \
- { \
- ae_context_destroy(__main_ctx); \
- } \
- aesop_finalize(); \
- return __main_ret; \
-}
#endif /* __AE_RESOURCE_H__ */
/*
diff --git a/resources/resourcebuilder/module.mk.in b/resources/resourcebuilder/module.mk.in
index 5031b63..6949220 100644
--- a/resources/resourcebuilder/module.mk.in
+++ b/resources/resourcebuilder/module.mk.in
@@ -2,6 +2,8 @@ DIR := resources/resourcebuilder
AESOP_HDR += $(DIR)/resourcebuilder.hae
+INSTALL_HDR += $(DIR)/resourcebuilder.hae
+
LIBSRC += $(DIR)/resourcebuilder.c
diff --git a/resources/resourcebuilder/resourcebuilder.c b/resources/resourcebuilder/resourcebuilder.c
index 7bf8ca1..257d467 100644
--- a/resources/resourcebuilder/resourcebuilder.c
+++ b/resources/resourcebuilder/resourcebuilder.c
@@ -3,6 +3,7 @@
*/
#include "resources/resourcebuilder/resourcebuilder.h"
#include "src/c-utils/triton-thread.h"
+#include "resource.h"
#define RB_DEFAULT_SIZE 64
#define RB_RESOURCE_NAME "resourcebuilder"
diff --git a/resources/thread/aethread.c b/resources/thread/aethread.c
index b7782a0..0dc77da 100644
--- a/resources/thread/aethread.c
+++ b/resources/thread/aethread.c
@@ -7,6 +7,7 @@
#include "op.h"
#include "opcache.h"
#include "resources/thread/aethread.h"
+#include "resource.h"
struct aethread_op
{
diff --git a/resources/thread/aethread.hae b/resources/thread/aethread.hae
index c41b0f3..5267c3e 100644
--- a/resources/thread/aethread.hae
+++ b/resources/thread/aethread.hae
@@ -1,7 +1,7 @@
#ifndef __AETHREAD_HAE__
#define __AETHREAD_HAE__
-#include "aesop.h"
+#include <aesop/aesop.h>
struct aethread_group;
diff --git a/resources/thread/module.mk.in b/resources/thread/module.mk.in
index c952dab..5a060b8 100644
--- a/resources/thread/module.mk.in
+++ b/resources/thread/module.mk.in
@@ -2,4 +2,6 @@ DIR := resources/thread
AESOP_HDR += $(DIR)/aethread.hae
+INSTALL_HDR += $(DIR)/aethread.hae
+
LIBSRC += $(DIR)/aethread.c
diff --git a/resources/timer/module.mk.in b/resources/timer/module.mk.in
index ee14128..08a6475 100644
--- a/resources/timer/module.mk.in
+++ b/resources/timer/module.mk.in
@@ -2,4 +2,6 @@ DIR := resources/timer
AESOP_HDR += $(DIR)/timer.hae
+INSTALL_HDR += $(DIR)/timer.hae
+
LIBSRC += $(DIR)/timer.c
diff --git a/resources/timer/timer.c b/resources/timer/timer.c
index bc8df00..b21977d 100644
--- a/resources/timer/timer.c
+++ b/resources/timer/timer.c
@@ -8,6 +8,7 @@
#include <assert.h>
#include <unistd.h>
#include "aesop.h"
+#include "resource.h"
#include "op.h"
#include "opcache.h"
#include "resources/timer/timer.h"
diff --git a/resources/timer/timer.hae b/resources/timer/timer.hae
index eee04b5..c8f7c3a 100644
--- a/resources/timer/timer.hae
+++ b/resources/timer/timer.hae
@@ -3,7 +3,7 @@
#include <errno.h>
-#include "aesop.h"
+#include <aesop/aesop.h>
/**
* run a timer for the specified number of milliseconds
diff --git a/src/aefile/aefile.ae b/src/aefile/aefile.ae
index e9f510c..c592081 100644
--- a/src/aefile/aefile.ae
+++ b/src/aefile/aefile.ae
@@ -12,6 +12,7 @@
#include "src/aefile/aefile.hae"
#include "resources/thread/aethread.hae"
+#include "resource.h"
struct aethread_group* file_threads = NULL;
diff --git a/src/aefile/aefile.hae b/src/aefile/aefile.hae
index f10eb1e..803f365 100644
--- a/src/aefile/aefile.hae
+++ b/src/aefile/aefile.hae
@@ -1,7 +1,7 @@
#ifndef __AEFILE_HAE__
#define __AEFILE_HAE__
-#include "aesop.h"
+#include <aesop/aesop.h>
#include <unistd.h>
#include <sys/types.h>
diff --git a/src/aefile/module.mk.in b/src/aefile/module.mk.in
index aa0887d..b24851c 100644
--- a/src/aefile/module.mk.in
+++ b/src/aefile/module.mk.in
@@ -2,4 +2,6 @@ DIR := src/aefile
AESOP_HDR += $(DIR)/aefile.hae
+INSTALL_HDR += $(DIR)/aefile.hae
+
AELIBSRC += $(DIR)/aefile.ae
diff --git a/src/c-utils b/src/c-utils
index e4d1f58..7f4af54 160000
--- a/src/c-utils
+++ b/src/c-utils
@@ -1 +1 @@
-Subproject commit e4d1f589cf370787f8d62aedf5887251c0d0ab81
+Subproject commit 7f4af54f5af9a97f346cfb1d8fc122b1f2203178
diff --git a/src/ssm/module.mk.in b/src/ssm/module.mk.in
index e54fa08..d7557ef 100644
--- a/src/ssm/module.mk.in
+++ b/src/ssm/module.mk.in
@@ -4,5 +4,6 @@ ifeq ($(BUILD_SSM),1)
AELIBSRC += $(DIR)/aessm.ae
AESOP_HDR += $(DIR)/aessm.hae
+INSTALL_HDR += $(DIR)/aessm.hae
endif
hooks/post-receive
--
aesop Repository
1
0
As a reminder: here's the number once more for the weekly concall:
Conference Access Number: 760-984-1000
Conference Passcode: 692481 #
Time: 3pm CET (usual time)
Dries
1
0
aesop Repository branch, master, updated. 8fd3b4619b2c5b0d6e230c0b243d4824eb07551c
by noreply@mcs.anl.gov 26 Mar '12
by noreply@mcs.anl.gov 26 Mar '12
26 Mar '12
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "aesop Repository".
The branch, master has been updated
via 8fd3b4619b2c5b0d6e230c0b243d4824eb07551c (commit)
via c8d17285ccd21a6c005a84e2d77798351e49e3b9 (commit)
via eb29fe70000e964cab106d1cad0516fed512aeb5 (commit)
via cd5363f97e012fa870c5f998deb9b37e2823ac3e (commit)
from 0f22e7e3c4153388575f8756ae9ec203e1b5d42e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8fd3b4619b2c5b0d6e230c0b243d4824eb07551c
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 10:08:39 2012 -0400
remove intermediate ae-thread.h file
commit c8d17285ccd21a6c005a84e2d77798351e49e3b9
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 09:59:08 2012 -0400
remove ae-list.h intermediate header
commit eb29fe70000e964cab106d1cad0516fed512aeb5
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 09:49:46 2012 -0400
get rid of intermediate ae-base.h file
commit cd5363f97e012fa870c5f998deb9b37e2823ac3e
Author: Phil Carns <carns(a)mcs.anl.gov>
Date: Mon Mar 26 09:39:12 2012 -0400
put headers in include/aesop subdir
-----------------------------------------------------------------------
Summary of changes:
Makefile.in | 8 ++--
ae-base.h | 11 ------
ae-blocking-parser.h | 4 +-
ae-ctl.h | 40 ++++++++++++------------
ae-list.h | 42 -------------------------
ae-thread.h | 18 ----------
aesop.h | 6 ++--
hints.h | 8 ++--
op.h | 30 +++++++++---------
resource.h | 4 +-
resources/resourcebuilder/resourcebuilder.c | 10 +++---
resources/resourcebuilder/resourcebuilder.hae | 2 +-
src/socket/aesocket.ae | 22 ++++++------
13 files changed, 67 insertions(+), 138 deletions(-)
delete mode 100644 ae-base.h
delete mode 100644 ae-list.h
delete mode 100644 ae-thread.h
Diff of changes:
diff --git a/Makefile.in b/Makefile.in
index 5246c55..9b08410 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -32,7 +32,7 @@ builddir = @BUILD_ABSOLUTE_TOP@
prefix = @prefix@
datarootdir = @datarootdir@
exec_prefix = @exec_prefix@
-includedir = $(DESTDIR)@includedir@
+includedir = $(DESTDIR)@includedir@/aesop
mandir = $(DESTDIR)@mandir@
sbindir = $(DESTDIR)@sbindir@
bindir = $(DESTDIR)@bindir@
@@ -678,7 +678,7 @@ install:: all
install -m 755 bin/aecc $(bindir)
install -m 755 bin/aecc-utils $(bindir)
install -m 644 lib/libaesop.* $(libdir)
- install -m 644 $(srcdir)/ae-list.h $(includedir)
+ install -m 644 $(srcdir)/src/c-utils/triton-list.h $(includedir)
install -m 644 $(srcdir)/ae-types.h $(includedir)
install -m 644 $(srcdir)/ae-ctl.h $(includedir)
install -m 644 $(srcdir)/ae-log.h $(includedir)
@@ -689,7 +689,7 @@ install:: all
install -m 644 $(srcdir)/hints.h $(includedir)
install -m 644 $(srcdir)/opcache.h $(includedir)
install -m 644 $(srcdir)/ae-init.h $(includedir)
- install -m 644 $(srcdir)/ae-thread.h $(includedir)
- install -m 644 $(srcdir)/ae-base.h $(includedir)
+ install -m 644 $(srcdir)/src/c-utils/triton-thread.h $(includedir)
+ install -m 644 $(srcdir)/src/c-utils/triton-base.h $(includedir)
install -m 644 $(srcdir)/ae-debug.h $(includedir)
install -m 644 $(srcdir)/op.h $(includedir)
diff --git a/ae-base.h b/ae-base.h
deleted file mode 100644
index 1050fe3..0000000
--- a/ae-base.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef AE_BASE_H
-#define AE_BASE_H
-
-/**
- * Aesop uses Triton base functions by default. Replace
- * this header with your own if you want to use Aesop without
- * Triton.
- */
-#include "triton-base.h"
-
-#endif
diff --git a/ae-blocking-parser.h b/ae-blocking-parser.h
index 1dee7f9..f744294 100644
--- a/ae-blocking-parser.h
+++ b/ae-blocking-parser.h
@@ -44,9 +44,9 @@
/* Don't know why lock was here: manipulating */ \
/* variables local to this code block ... */ \
state = AE_CTL_CALL_COMPLETE; \
- /* ae_mutex_lock(&__ae_ctl->gen.mutex); */ \
+ /* triton_mutex_lock(&__ae_ctl->gen.mutex); */ \
ae_op_id_clear(__ae_ctl->gen.current_op_id); \
- /* ae_mutex_unlock(&__ae_ctl->gen.mutex); */
+ /* triton_mutex_unlock(&__ae_ctl->gen.mutex); */
#define AE_MK_CB_FN_INVOKE_WORKER(__bfun, __fname, __pos_str) \
cbret = __ae_worker_##__bfun(__ae_ctl, &state); \
diff --git a/ae-ctl.h b/ae-ctl.h
index 316c23a..18b0bdf 100644
--- a/ae-ctl.h
+++ b/ae-ctl.h
@@ -2,8 +2,8 @@
#define __AE_CTL_H__
#include "ae-types.h"
-#include "ae-thread.h"
-#include "ae-list.h"
+#include "src/c-utils/triton-thread.h"
+#include "src/c-utils/triton-list.h"
#include "ae-error.h"
#include "hints.h"
@@ -62,9 +62,9 @@ struct ae_ctl
struct ae_ctl *parent;
void *spec_ctl;
ae_op_id_t current_op_id;
- ae_mutex_t mutex;
- ae_list_t children;
- struct ae_list_link link;
+ triton_mutex_t mutex;
+ triton_list_t children;
+ struct triton_list_link link;
int posted;
int completed;
int allposted;
@@ -103,8 +103,8 @@ static inline void ae_ctl_init(struct ae_ctl *ctl,
ctl->hints = hints;
ctl->context = context;
- ae_mutex_init(&ctl->mutex, NULL);
- ae_list_init(&ctl->children);
+ triton_mutex_init(&ctl->mutex, NULL);
+ triton_list_init(&ctl->children);
OPA_store_int (&ctl->refcount, 1);
ae_op_id_clear(ctl->current_op_id);
if(internal) ctl->parent = (struct ae_ctl *)user_ptr;
@@ -169,12 +169,12 @@ static inline void ae_ctl_pwait_start(struct ae_ctl *ctl)
ctl->posted = 0;
ctl->completed = 0;
ctl->allposted = 0;
- assert(ae_list_count(&ctl->children) == 0);
+ assert(triton_list_count(&ctl->children) == 0);
}
static inline void ae_ctl_lone_pbranch_start(struct ae_ctl *ctl)
{
- ae_list_link_clear(&ctl->link);
+ triton_list_link_clear(&ctl->link);
ae_lone_pbranches_add(ctl);
/* parent context disappears, we need to copy the hint */
ae_hints_dup(ctl->parent->hints, &ctl->hints);
@@ -193,19 +193,19 @@ static inline void ae_ctl_lone_pbranch_done(struct ae_ctl *ctl, enum ae_ctl_stat
static inline void ae_ctl_pbranch_start(struct ae_ctl *ctl)
{
ae_hints_dup(ctl->parent->hints, &ctl->hints);
- ae_mutex_lock(&ctl->parent->mutex);
+ triton_mutex_lock(&ctl->parent->mutex);
ctl->parent->posted++;
- ae_list_link_clear(&ctl->link);
- ae_list_add_back(&ctl->link, &ctl->parent->children);
- ae_mutex_unlock(&ctl->parent->mutex);
+ triton_list_link_clear(&ctl->link);
+ triton_list_add_back(&ctl->link, &ctl->parent->children);
+ triton_mutex_unlock(&ctl->parent->mutex);
}
static inline enum ae_pwait_command ae_ctl_pbranch_done(struct ae_ctl *ctl, enum ae_ctl_state *state)
{
/* lock parent mutex */
- ae_mutex_lock(&ctl->parent->mutex);
+ triton_mutex_lock(&ctl->parent->mutex);
/* remove myself from parent list (parent->children) */
- ae_list_del(&ctl->link);
+ triton_list_del(&ctl->link);
/* destroy my hints */
ae_hints_destroy(ctl->hints);
/* increment completed count of parent ctl */
@@ -217,17 +217,17 @@ static inline enum ae_pwait_command ae_ctl_pbranch_done(struct ae_ctl *ctl, enum
/* set state of this control so that callback can do the right thing */
*state |= AE_CTL_PWAIT_DONE;
/* tell pwait to continue */
- ae_mutex_unlock(&ctl->parent->mutex);
+ triton_mutex_unlock(&ctl->parent->mutex);
return AE_PWAIT_CONTINUE;
}
- ae_mutex_unlock(&ctl->parent->mutex);
+ triton_mutex_unlock(&ctl->parent->mutex);
return AE_PWAIT_YIELD;
}
static inline enum ae_pwait_command ae_ctl_pwait_init_done(struct ae_ctl *ctl)
{
- ae_mutex_lock(&ctl->mutex);
+ triton_mutex_lock(&ctl->mutex);
/* This has to be the initial pass through the pbranches
* of the pwait.
@@ -241,14 +241,14 @@ static inline enum ae_pwait_command ae_ctl_pwait_init_done(struct ae_ctl *ctl)
*/
if(ctl->posted == ctl->completed)
{
- ae_mutex_unlock(&ctl->mutex);
+ triton_mutex_unlock(&ctl->mutex);
return AE_PWAIT_CONTINUE;
}
/* Otherwise (not all pbranches have completed),
* we need to tell the pwait to yield.
*/
- ae_mutex_unlock(&ctl->mutex);
+ triton_mutex_unlock(&ctl->mutex);
return AE_PWAIT_YIELD;
}
diff --git a/ae-list.h b/ae-list.h
deleted file mode 100644
index b68df66..0000000
--- a/ae-list.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef AE_LIST_H
-#define AE_LIST_H
-
-/**
- * Aesop uses Triton list functions by default. Replace
- * this header with your own if you want to use Aesop without
- * Triton.
- */
-#include "triton-list.h"
-
-typedef triton_list_t ae_list_t;
-typedef triton_list_link_t ae_list_link_t;
-
-#define ae_list_link triton_list_link
-
-#define ae_list_init triton_list_init
-
-#define ae_list_count triton_list_count
-
-#define ae_list_empty triton_list_empty
-
-#define ae_list_link_clear triton_list_link_clear
-#define ae_list_add_back triton_list_add_back
-
-#define ae_list_del triton_list_del
-
-#define ae_queue_enqueue triton_queue_enqueue
-#define ae_queue_dequeue triton_queue_dequeue
-#define ae_queue_peek triton_queue_peek
-
-#define ae_list_for_each_entry triton_list_for_each_entry
-#define ae_list_for_each_entry_reverse triton_list_for_each_entry_reverse
-
-#define ae_list_exists triton_list_exists
-#define ae_list_find triton_list_find
-
-#define ae_list_insert_after triton_list_insert_after
-#define ae_list_insert_before triton_list_insert_before
-
-#define ae_list_get_entry triton_list_get_entry
-
-#endif
diff --git a/ae-thread.h b/ae-thread.h
deleted file mode 100644
index fce17ed..0000000
--- a/ae-thread.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef AE_THREAD_H
-#define AE_THREAD_H
-
-/**
- * Aesop uses Triton thread interfaces by default. If
- * you want to use Aesop without Triton, replace the
- * following macros with your own.
- */
-#include "triton-thread.h"
-
-#define AE_MUTEX_INITIALIZER TRITON_MUTEX_INITIALIZER
-
-typedef triton_mutex_t ae_mutex_t;
-#define ae_mutex_init triton_mutex_init
-#define ae_mutex_lock triton_mutex_lock
-#define ae_mutex_unlock triton_mutex_unlock
-
-#endif
diff --git a/aesop.h b/aesop.h
index ca7de05..511e798 100644
--- a/aesop.h
+++ b/aesop.h
@@ -1,10 +1,10 @@
#ifndef __AESOP_H__
#define __AESOP_H__
-#include "ae-base.h"
+#include "src/c-utils/triton-base.h"
#include "ae-error.h"
-#include "ae-thread.h"
-#include "ae-list.h"
+#include "src/c-utils/triton-list.h"
+#include "src/c-utils/triton-thread.h"
#include "ae-log.h"
#include "ae-debug.h"
diff --git a/hints.h b/hints.h
index 3ee378b..cd0d4f8 100644
--- a/hints.h
+++ b/hints.h
@@ -1,13 +1,13 @@
#ifndef __AE_HINTS_H__
#define __AE_HINTS_H__
-#include "ae-base.h"
-#include "ae-list.h"
-#include "ae-thread.h"
+#include "src/c-utils/triton-base.h"
+#include "src/c-utils/triton-list.h"
+#include "src/c-utils/triton-thread.h"
struct ae_hints
{
- ae_list_t entries;
+ triton_list_t entries;
int transfer_count;
struct ae_hints *parent;
triton_mutex_t lock;
diff --git a/op.h b/op.h
index c82cfbb..3ae17a7 100644
--- a/op.h
+++ b/op.h
@@ -3,7 +3,7 @@
#define __OP_H__
#include "aesop.h"
-#include "ae-list.h"
+#include "src/c-utils/triton-list.h"
#include <stdint.h>
@@ -14,10 +14,10 @@ typedef struct ae_op
void *user_ptr;
ae_hints_t *hints;
ae_context_t ctx;
- ae_list_link_t link;
+ triton_list_link_t link;
} ae_op_t;
-#define ae_op_from_link(_link) ae_list_get_entry((_link), struct ae_op, link)
+#define ae_op_from_link(_link) triton_list_get_entry((_link), struct ae_op, link)
#define ae_op_entry(_op, _type, _member) \
((_op != NULL) ? \
@@ -42,7 +42,7 @@ typedef struct ae_op
(_op)->ctx = (_ctx); \
} while(0)
-#define ae_ops_link_clear(_op) ae_list_link_clear(&(_op)->link)
+#define ae_ops_link_clear(_op) triton_list_link_clear(&(_op)->link)
#define ae_op_clear(_op) \
do { \
@@ -53,35 +53,35 @@ typedef struct ae_op
ae_ops_link_clear(_op); \
} while(0)
-typedef ae_list_t ae_ops_t;
+typedef triton_list_t ae_ops_t;
-#define ae_ops_init(ops) ae_list_init(ops)
+#define ae_ops_init(ops) triton_list_init(ops)
#define ae_ops_destroy(ops) (void) ops
-#define ae_ops_enqueue(_op, _queue) ae_queue_enqueue(&(_op)->link, _queue)
+#define ae_ops_enqueue(_op, _queue) triton_queue_enqueue(&(_op)->link, _queue)
static inline ae_op_t *ae_ops_dequeue(ae_ops_t *queue)
{
- ae_list_link_t *llink;
- llink = ae_queue_dequeue(queue);
+ triton_list_link_t *llink;
+ llink = triton_queue_dequeue(queue);
if(!llink) return NULL;
return ae_op_from_link(llink);
}
-#define ae_ops_del(_op) ae_list_del(&(_op)->link)
-#define ae_ops_empty(_ops) ae_list_empty(_ops)
+#define ae_ops_del(_op) triton_list_del(&(_op)->link)
+#define ae_ops_empty(_ops) triton_list_empty(_ops)
static inline ae_op_t *ae_ops_peek(ae_ops_t *queue)
{
- ae_list_link_t *llink;
- llink = ae_queue_peek(queue);
+ triton_list_link_t *llink;
+ llink = triton_queue_peek(queue);
if(!llink) return NULL;
return ae_op_from_link(llink);
}
-#define ae_ops_for_each(_pos, _safe, _ops) ae_list_for_each_entry(_pos, _safe, _ops, struct ae_op, link)
-#define ae_ops_for_each_reverse(_pos, _safe, _ops) ae_list_for_each_entry_reverse(_pos, _safe, _ops, struct ae_op, link)
+#define ae_ops_for_each(_pos, _safe, _ops) triton_list_for_each_entry(_pos, _safe, _ops, struct ae_op, link)
+#define ae_ops_for_each_reverse(_pos, _safe, _ops) triton_list_for_each_entry_reverse(_pos, _safe, _ops, struct ae_op, link)
#define ae_ops_exists(_ops, _op) triton_list_exists(_ops, _op)
#define ae_ops_count(_ops) triton_list_count(_ops)
#define ae_ops_find(_ops, _compare, _ptr) triton_list_find(_ops, _compare, _ptr)
diff --git a/resource.h b/resource.h
index a337b5e..7f68ddd 100644
--- a/resource.h
+++ b/resource.h
@@ -2,8 +2,8 @@
#define __RESOURCE_H__
#include "ae-types.h"
-#include "ae-thread.h"
-#include "ae-list.h"
+#include "src/c-utils/triton-thread.h"
+#include "src/c-utils/triton-list.h"
#include "ae-error.h"
#include "ae-ctl.h"
#include "hints.h"
diff --git a/resources/resourcebuilder/resourcebuilder.c b/resources/resourcebuilder/resourcebuilder.c
index 5125ed1..7bf8ca1 100644
--- a/resources/resourcebuilder/resourcebuilder.c
+++ b/resources/resourcebuilder/resourcebuilder.c
@@ -2,7 +2,7 @@
* make will try to build ./resourcebuilder.h and fail.
*/
#include "resources/resourcebuilder/resourcebuilder.h"
-#include "ae-thread.h"
+#include "src/c-utils/triton-thread.h"
#define RB_DEFAULT_SIZE 64
#define RB_RESOURCE_NAME "resourcebuilder"
@@ -62,7 +62,7 @@ static int rb_callback (rb_slot_t * slot, int success)
void (*callback)(void *, int) = 0;
void * user_ptr = 0;
- ae_mutex_lock (&slot->lock);
+ triton_mutex_lock (&slot->lock);
switch (slot->status)
{
case STATUS_UNINITIALIZED:
@@ -96,7 +96,7 @@ static int rb_callback (rb_slot_t * slot, int success)
break;
}
- ae_mutex_unlock (&slot->lock);
+ triton_mutex_unlock (&slot->lock);
if (callback)
callback (user_ptr, (success ? AE_SUCCESS : AE_ERR_INVALID));
@@ -185,7 +185,7 @@ ae_define_post (int, rb_slot_capture, rb_slot_t * slot)
int ret;
int aret;
- ae_mutex_lock (&slot->lock);
+ triton_mutex_lock (&slot->lock);
switch (slot->status)
{
case STATUS_COMPLETED_SUCCESS:
@@ -212,7 +212,7 @@ ae_define_post (int, rb_slot_capture, rb_slot_t * slot)
slot->status = STATUS_ARMED;
break;
}
- ae_mutex_unlock (&slot->lock);
+ triton_mutex_unlock (&slot->lock);
*__ae_retval = ret;
return aret;
diff --git a/resources/resourcebuilder/resourcebuilder.hae b/resources/resourcebuilder/resourcebuilder.hae
index 4a6bdce..3b0f7ea 100644
--- a/resources/resourcebuilder/resourcebuilder.hae
+++ b/resources/resourcebuilder/resourcebuilder.hae
@@ -14,7 +14,7 @@ struct rb_slot_t
struct ae_op op;
#ifdef RB_NO_OPA
- ae_mutex_t lock;
+ triton_mutex_t lock;
int status;
#else
OPA_int_t status;
diff --git a/src/socket/aesocket.ae b/src/socket/aesocket.ae
index 1a657e4..8c2d9b6 100644
--- a/src/socket/aesocket.ae
+++ b/src/socket/aesocket.ae
@@ -23,7 +23,7 @@ static int immediate_completion = 1;
#define ZERO_BYTE_READ_THRESHOLD 0
-static ae_mutex_t mutex = AE_MUTEX_INITIALIZER;
+static triton_mutex_t mutex = TRITON_MUTEX_INITIALIZER;
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
static unsigned int refcount = 0;
@@ -55,7 +55,7 @@ static void socket_thread_wake_cb (struct ev_loop * loop, ev_async * w, int
static void aesocket_check_queue (void)
{
- ae_mutex_lock (&mutex);
+ triton_mutex_lock (&mutex);
while (socket_thread_add != 0)
{
@@ -79,7 +79,7 @@ static void aesocket_check_queue (void)
pthread_cond_broadcast (&cond);
- ae_mutex_unlock (&mutex);
+ triton_mutex_unlock (&mutex);
}
static void aesocket_thread_wakeup (void)
@@ -98,7 +98,7 @@ static void * aesocket_thread_main (void * arg)
int aesocket_init (void)
{
- ae_mutex_lock (&mutex);
+ triton_mutex_lock (&mutex);
if (!refcount++)
{
socket_ev_loop = ev_loop_new (EVFLAG_AUTO);
@@ -107,13 +107,13 @@ int aesocket_init (void)
pthread_create (&socket_thread, 0, aesocket_thread_main, 0);
}
- ae_mutex_unlock (&mutex);
+ triton_mutex_unlock (&mutex);
return AE_SUCCESS;
}
int aesocket_finalize (void)
{
- ae_mutex_lock (&mutex);
+ triton_mutex_lock (&mutex);
if (0 == --refcount)
{
socket_thread_done = 1;
@@ -122,7 +122,7 @@ int aesocket_finalize (void)
ev_loop_destroy (socket_ev_loop);
}
- ae_mutex_unlock (&mutex);
+ triton_mutex_unlock (&mutex);
return AE_SUCCESS;
}
@@ -155,7 +155,7 @@ __blocking int aesocket_ready (int fd, int flags, int * err)
rb_slot_initialize (&entry.slot);
- ae_mutex_lock (&mutex);
+ triton_mutex_lock (&mutex);
{
entry.next = socket_thread_add;
@@ -164,7 +164,7 @@ __blocking int aesocket_ready (int fd, int flags, int * err)
aesocket_thread_wakeup ();
}
- ae_mutex_unlock (&mutex);
+ triton_mutex_unlock (&mutex);
ret = rb_slot_capture (&entry.slot);
@@ -175,7 +175,7 @@ __blocking int aesocket_ready (int fd, int flags, int * err)
int added = 1;
/* we're cancelled */
- ae_mutex_lock (&mutex);
+ triton_mutex_lock (&mutex);
/* check if the libev thread already added the fd */
if (socket_thread_add == &entry)
@@ -213,7 +213,7 @@ __blocking int aesocket_ready (int fd, int flags, int * err)
}
}
- ae_mutex_unlock (&mutex);
+ triton_mutex_unlock (&mutex);
ret = AE_ERR_CANCELLED;
}
hooks/post-receive
--
aesop Repository
1
0
#9: Update license information
-------------------+--------------------------------------------------------
Reporter: carns | Owner: carns
Type: defect | Status: accepted
Priority: major | Component: component1
Version: | Keywords:
-------------------+--------------------------------------------------------
Changes (by carns):
* owner: somebody => carns
* status: new => accepted
--
Ticket URL: <https://trac.mcs.anl.gov/projects/aesop/ticket/9#comment:1>
aesop <https://trac.mcs.anl.gov/projects/aesop>
The Aesop Language
1
0
I pushed a basic SSM module to the aesop repo. Here's a quick README.
The SSM module is based on the r944 version of the SSM trunk. I think this API is consistent with the last drop as well. The aesop'ified version tries to be a thin wrapper around SSM and not change too much.
src/ssm/aessm.hae - header for aessm functions.
When configuring aesop, use '--with-ssm=<path/to/ssm/>', the path should point to a place that has <path/to/ssm>/common/ and <path/to/ssm>/lib/.
Right now the configure adds the libssm_ref and libssmp_localmem libraries. So the above path assumes both those libraries are found in lib. The test cases use the localmem transport.
in src/ssm/test/ there are four tests:
ssmput.ae - demonstrates a put
ssmget.ae - demonstrates a get
ssmmsg.ae - demonstrates a msg
ssmping.ae - demonstrates a ping
To build those:
make src/ssm/test/ssmput
make src/ssm/test/ssmget
make src/ssm/test/ssmmsg
make src/ssm/test/ssmping
To run them:
./src/ssm/test/ssmput
./src/ssm/test/ssmget
./src/ssm/test/ssmmsg
./src/ssm/test/ssmping
They print 'SUCCESS' if they work, otherwise they will assert.
Caveats:
- aessm_initialize hard codes use of the localmem transport. We plan to have a configuration system to pass this stuff in but it's not available yet.
- Shane sent out a long detailed description of how not to leak memory. I probably didn't follow it, so that might be happening.
- a single match entry can not be used in parallel puts. This is just a side effect of how i coded it.
- I implemented support for cancellation but haven't tested it yet.
- It is possible using some of the flags that automatically free 'stuff', might break this code since the callback data structure tracks important info.
- Right now, one specifies how many times they want to match a buffer in the aessm_link call. That will move to the aessm_wait call in the future. (and specifying > 1 has no meaning since SSM doesn't support it yet)
I will work on building some more complicated examples that use MPI.
kevin
1
0
aesop Repository branch, master, updated. 0f22e7e3c4153388575f8756ae9ec203e1b5d42e
by noreply@mcs.anl.gov 20 Mar '12
by noreply@mcs.anl.gov 20 Mar '12
20 Mar '12
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "aesop Repository".
The branch, master has been updated
via 0f22e7e3c4153388575f8756ae9ec203e1b5d42e (commit)
from 513de654559cf1a43539dac0abf8674825302b6b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0f22e7e3c4153388575f8756ae9ec203e1b5d42e
Author: Kevin Harms <harms(a)alcf.anl.gov>
Date: Tue Mar 20 17:15:26 2012 -0500
Initial module for SSM, based on r944 of nebula repo
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +
src/ssm/aessm.ae | 614 +++++++++++++++++++++++++++++++++++++++++++++
src/ssm/aessm.hae | 31 +++
src/ssm/module.mk.in | 8 +
src/ssm/test/module.mk.in | 10 +
src/ssm/test/ssmget.ae | 122 +++++++++
src/ssm/test/ssmmsg.ae | 113 +++++++++
src/ssm/test/ssmping.ae | 82 ++++++
src/ssm/test/ssmput.ae | 120 +++++++++
9 files changed, 1102 insertions(+), 0 deletions(-)
create mode 100644 src/ssm/aessm.ae
create mode 100644 src/ssm/aessm.hae
create mode 100644 src/ssm/module.mk.in
create mode 100644 src/ssm/test/module.mk.in
create mode 100644 src/ssm/test/ssmget.ae
create mode 100644 src/ssm/test/ssmmsg.ae
create mode 100644 src/ssm/test/ssmping.ae
create mode 100644 src/ssm/test/ssmput.ae
Diff of changes:
diff --git a/configure.ac b/configure.ac
index d5db947..7309f82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -316,6 +316,8 @@ parser/module.mk
parser/tests/blocking/module.mk
src/socket/module.mk
src/socket/test/module.mk
+src/ssm/module.mk
+src/ssm/test/module.mk
doc/module.mk
])
diff --git a/src/ssm/aessm.ae b/src/ssm/aessm.ae
new file mode 100644
index 0000000..4ff90e6
--- /dev/null
+++ b/src/ssm/aessm.ae
@@ -0,0 +1,614 @@
+#include "aesop.h"
+#include "ae-error.h"
+#include "resources/resourcebuilder/resourcebuilder.hae"
+#include "aessm.hae"
+
+#include "ssm.h"
+#include "ssmdef.h"
+#include "ssmp_unix_tcp.h"
+#include "ssmp_localmem.h"
+
+#include <pthread.h>
+#include <sys/time.h>
+
+/*
+ * Struct: aessm_cb_s
+ * Members:
+ * slot1 - holds RB slot for initial call
+ * slot2 - holds RB slot for cancellation call
+ * evt - results of SSM event structure
+ * completion_count - expected number of local completions
+ * completion_error - number of local completions that were errors.
+ * Comments:
+ * This structure holds data needed to track the state of the blocking
+ * operation and is used in the <aessm_callback>.
+ */
+typedef struct aessm_cb_s
+{
+ rb_slot_t slot1;
+ rb_slot_t slot2;
+ ssm_evt_t evt;
+ uint64_t completion_expected;
+ uint64_t completion_count;
+ uint64_t completion_error;
+} aessm_cb_t;
+
+/*
+ * Function: aessm_callback
+ * Generic callback used from all SSM calls generated from within
+ * the aessm module.
+ *
+ * Parameters:
+ * cbdata - data supplied in ssm_cb()
+ * evdata - data supplied from SSM event.
+ *
+ * Returns:
+ * void
+ */
+static void aessm_callback (void *cbdata, void *evdata)
+{
+ ssm_evt_p evtp;
+ aessm_cb_t *data;
+
+ evtp = (ssm_evt_p) evdata;
+ data = (aessm_cb_t *) cbdata;
+
+//printf ("cb: op=0x%x owner=%d result=%d\n",
+// evtp->op, evtp->owner, evtp->result);
+
+ if (evtp->op == SSM_OP_UNLINK)
+ {
+ data->evt = *evtp;
+ rb_slot_complete(&data->slot1);
+ rb_slot_complete(&data->slot2);
+ }
+ else if ((evtp->op == SSM_OP_PUT) ||
+ (evtp->op == SSM_OP_GET) ||
+ (evtp->op == SSM_OP_MSG) ||
+ (evtp->op == SSM_OP_PING))
+ {
+ data->evt = *evtp;
+ switch (evtp->result)
+ {
+ case SSM_RESULT_NO_MATCH:
+ case SSM_RESULT_CANCELLED:
+ case SSM_RESULT_TIMEOUT:
+ case SSM_RESULT_NETWORK_FAILURE:
+ data->completion_error += 1;
+ case SSM_RESULT_SUCCESS:
+ data->completion_count += 1;
+ if (evtp->owner == SSM_OWNER_REMOTE)
+ {
+ if (data->completion_count >= data->completion_expected)
+ {
+ rb_slot_complete(&data->slot1);
+ rb_slot_complete(&data->slot2);
+ }
+ }
+ else
+ {
+ rb_slot_complete(&data->slot1);
+ rb_slot_complete(&data->slot2);
+ }
+ break;
+ case SSM_RESULT_INIT:
+ default:
+ break;
+ }
+ }
+ else
+ {
+ // unknown operation
+ assert(0);
+ }
+ return;
+}
+
+/*
+ * Function: aessm_link
+ * Wraps the ssm_link call. All aessm operations must use <aessm_link>.
+ *
+ * Parameters:
+ * id - SSM instance id.
+ * flags - ssm_link flags.
+ * match_bits - ssm_link match bits.
+ * mask_bits - ssm_link mask bits.
+ * data_iovec - buffer to associate with match or data movement operation.
+ * pos - position to insert into match list.
+ * anchor - reference to us for pos.
+ * count - expected number of local completions.
+ * me_id - generated match entry.
+ *
+ * Returns:
+ * AE_SUCCESS - on success
+ * AE_ERR_SYSTEM - on failure
+ * me - The generated match entry is returned in this parameter.
+ *
+ * Comments:
+ * A standard callback is associated with all ssm operations.
+ * This callback handles waking up the correct blocking functions.
+ */
+int aessm_link (ssm_id ssm,
+ ssm_flags16 flags,
+ ssm_match_bits match_bits,
+ ssm_match_bits mask_bits,
+ ssm_iovec_p data_iovec,
+ ssm_me_pos pos,
+ ssm_me_id anchor,
+ uint64_t count,
+ ssm_me_id *me_id)
+{
+ aessm_cb_t *cb_dt;
+ ssm_cb_id cb_id;
+
+ cb_dt = malloc(sizeof(aessm_cb_t));
+ if (cb_dt == NULL)
+ {
+ return AE_ERR_SYSTEM;
+ }
+
+ memset(cb_dt, 0, sizeof(aessm_cb_t));
+ rb_slot_initialize(&cb_dt->slot1);
+ rb_slot_initialize(&cb_dt->slot2);
+ cb_dt->completion_expected = count;
+
+ cb_id = ssm_cb (aessm_callback, cb_dt, SSM_CB_NO_FLAGS);
+ if (cb_id == NULL)
+ {
+ return AE_ERR_SYSTEM;
+ }
+
+ *me_id = ssm_link (ssm, flags, match_bits, mask_bits,
+ data_iovec, pos, anchor, cb_id);
+ if (*me_id == SSM_ME_NONE)
+ {
+ return AE_ERR_SYSTEM;
+ }
+
+ return AE_SUCCESS;
+}
+
+/*
+ * Function: aessm_unlink
+ * Wraps the ssm_unlink fuction.
+ *
+ * Parameters:
+ * me_id - the match entry created by an <aessm_link> call.
+ * evt_id - detailed results of the operation. Can be NULL.
+ *
+ * Returns:
+ * AE_SUCCESS - if the call completed successfully.
+ * AE_ERR_CANCELLED - if the call was cancelled.
+ * evt - filled with results of completion callback if not NULL.
+ */
+__blocking int aessm_unlink(ssm_me_id me_id, ssm_evt_p evt_id)
+{
+ aessm_cb_t *cb_dt;
+ ssm_cb_id cb_id;
+ int rc;
+
+ cb_id = ssm_me_cb(me_id);
+ assert(cb_id);
+
+ cb_dt = ssm_cb_data(cb_id);
+ assert(cb_dt);
+
+ assert(rb_slot_reinitialize(&cb_dt->slot1));
+ assert(rb_slot_reinitialize(&cb_dt->slot2));
+
+ ssm_unlink(me_id);
+
+ rc = rb_slot_capture(&cb_dt->slot1);
+ if (rc == AE_ERR_CANCELLED)
+ {
+ rc = rb_slot_capture(&cb_dt->slot2);
+ assert(rc == AE_SUCCESS);
+ }
+ else
+ {
+ rc = rb_slot_capture(&cb_dt->slot2);
+ }
+
+ if (evt_id)
+ {
+ *evt_id = cb_dt->evt;
+ }
+
+ rb_slot_destroy(&cb_dt->slot1);
+ rb_slot_destroy(&cb_dt->slot2);
+
+ free(cb_id);
+ free(cb_dt);
+
+ return rc;
+}
+
+/*
+ * Function: aessm_put
+ * Wraps ssm_put.
+ *
+ * Parameters:
+ * me_id - The match entry that describes the memory to put.
+ * raddr_id - the address of the remote target.
+ * evt_id - detailed results of the operation. Can be NULL.
+ *
+ * Returns:
+ * AE_SUCCESS - if the operation was successful.
+ * AE_ERR_CANCELLED - if the operation was cancelled.
+ * AE_ERR_* - other error conditions.
+ */
+__blocking int aessm_put (ssm_me_id me_id,
+ ssm_addr_id raddr_id,
+ ssm_evt_p evt_id)
+{
+ aessm_cb_t *cb_dt;
+ ssm_tx_id tx_id;
+ ssm_cb_id cb_id;
+ ssm_id ssm;
+ int rc;
+
+ cb_id = ssm_me_cb(me_id);
+ assert(cb_id);
+
+ cb_dt = ssm_cb_data(cb_id);
+ assert(cb_dt);
+
+ assert(rb_slot_reinitialize(&cb_dt->slot1));
+ assert(rb_slot_reinitialize(&cb_dt->slot2));
+
+ tx_id = ssm_put (me_id, raddr_id);
+ if (tx_id == SSM_TX_NONE)
+ {
+ rb_slot_clear(&cb_dt->slot1);
+ rb_slot_clear(&cb_dt->slot2);
+ return AE_ERR_SYSTEM;
+ }
+
+ rc = rb_slot_capture(&cb_dt->slot1);
+ if (rc == AE_ERR_CANCELLED)
+ {
+ ssm = ssm_me_owner(me_id);
+ (void) ssm_cancel(ssm, tx_id);
+ rc = rb_slot_capture(&cb_dt->slot2);
+ assert(rc == AE_SUCCESS);
+ }
+ else
+ {
+ rc = rb_slot_capture(&cb_dt->slot2);
+ }
+
+ if (evt_id)
+ {
+ *evt_id = cb_dt->evt;
+ }
+
+ rb_slot_destroy(&cb_dt->slot1);
+ rb_slot_destroy(&cb_dt->slot2);
+
+ return rc;
+}
+
+/*
+ * Function: aessm_get
+ * Wraps ssm_get.
+ *
+ * Parameters:
+ * me_id - The match entry that describes the memory to get.
+ * raddr_id - the address of the remote target.
+ * evt - detailed results of the operation. Can be NULL.
+ *
+ * Returns:
+ * AE_SUCCESS - if the operation was successful.
+ * AE_ERR_CANCELLED - if the operation was cancelled.
+ * AE_ERR_* - other error conditions.
+ */
+__blocking int aessm_get (ssm_me_id me_id,
+ ssm_addr_id raddr_id,
+ ssm_evt_p evt_id)
+{
+ aessm_cb_t *cb_dt;
+ ssm_tx_id tx_id;
+ ssm_cb_id cb_id;
+ ssm_id ssm;
+ int rc;
+
+ cb_id = ssm_me_cb(me_id);
+ assert(cb_id);
+
+ cb_dt = ssm_cb_data(cb_id);
+ assert(cb_dt);
+
+ assert(rb_slot_reinitialize(&cb_dt->slot1));
+ assert(rb_slot_reinitialize(&cb_dt->slot2));
+
+ tx_id = ssm_get (me_id, raddr_id);
+ if (tx_id == SSM_TX_NONE)
+ {
+ rb_slot_clear(&cb_dt->slot1);
+ rb_slot_clear(&cb_dt->slot2);
+ return AE_ERR_SYSTEM;
+ }
+
+ rc = rb_slot_capture(&cb_dt->slot1);
+ if (rc == AE_ERR_CANCELLED)
+ {
+ ssm = ssm_me_owner(me_id);
+ (void) ssm_cancel(ssm, tx_id);
+ rc = rb_slot_capture(&cb_dt->slot2);
+ assert(rc == AE_SUCCESS);
+ }
+ else
+ {
+ rc = rb_slot_capture(&cb_dt->slot2);
+ }
+
+ if (evt_id)
+ {
+ *evt_id = cb_dt->evt;
+ }
+
+ rb_slot_destroy(&cb_dt->slot1);
+ rb_slot_destroy(&cb_dt->slot2);
+
+ return rc;
+}
+
+/*
+ * Function: aessm_msg
+ * Wraps ssm_msg.
+ *
+ * Parameters:
+ * me_id - The match entry that describes the remote host to send to.
+ * raddr_id - the address of the remote target.
+ * info_a - 64bit piece of data to pass to other end.
+ * info_b - 64bit piece of data to pass to other end.
+ * evt - detailed results of the operation. Can be NULL.
+ *
+ * Returns:
+ * AE_SUCCESS - if the operation was successful.
+ * AE_ERR_CANCELLED - if the operation was cancelled.
+ * AE_ERR_* - other error conditions.
+ */
+__blocking int aessm_msg (ssm_me_id me_id,
+ ssm_addr_id raddr_id,
+ uint64_t info_a,
+ uint64_t info_b,
+ ssm_evt_p evt_id)
+{
+ aessm_cb_t *cb_dt;
+ ssm_tx_id tx_id;
+ ssm_cb_id cb_id;
+ ssm_id ssm;
+ int rc;
+
+ cb_id = ssm_me_cb(me_id);
+ assert(cb_id);
+
+ cb_dt = ssm_cb_data(cb_id);
+ assert(cb_dt);
+
+ assert(rb_slot_reinitialize(&cb_dt->slot1));
+ assert(rb_slot_reinitialize(&cb_dt->slot2));
+
+ // right now it is assumed this can't fail.
+ (void) ssm_msg (me_id, raddr_id, info_a, info_b);
+
+ rc = rb_slot_capture(&cb_dt->slot1);
+ if (rc == AE_ERR_CANCELLED)
+ {
+ ssm = ssm_me_owner(me_id);
+ (void) ssm_cancel(ssm, tx_id);
+ rc = rb_slot_capture(&cb_dt->slot2);
+ assert(rc == AE_SUCCESS);
+ }
+ else
+ {
+ rc = rb_slot_capture(&cb_dt->slot2);
+ }
+
+ if (evt_id)
+ {
+ *evt_id = cb_dt->evt;
+ }
+
+ rb_slot_destroy(&cb_dt->slot1);
+ rb_slot_destroy(&cb_dt->slot2);
+
+ return rc;
+}
+
+/*
+ * Function: aessm_ping
+ * Wraps ssm_ping.
+ *
+ * Parameters:
+ * me_id - The match entry that describes the host to ping.
+ * raddr_id - the address of the remote target.
+ * evt - detailed results of the operation. Can be NULL.
+ *
+ * Returns:
+ * AE_SUCCESS - if the operation was successful.
+ * AE_ERR_CANCELLED - if the operation was cancelled.
+ * AE_ERR_* - other error conditions.
+ */
+__blocking int aessm_ping (ssm_me_id me_id,
+ ssm_addr_id raddr_id,
+ ssm_evt_p evt_id)
+{
+ aessm_cb_t *cb_dt;
+ ssm_tx_id tx_id;
+ ssm_cb_id cb_id;
+ ssm_id ssm;
+ int rc;
+
+ cb_id = ssm_me_cb(me_id);
+ assert(cb_id);
+
+ cb_dt = ssm_cb_data(cb_id);
+ assert(cb_dt);
+
+ assert(rb_slot_reinitialize(&cb_dt->slot1));
+ assert(rb_slot_reinitialize(&cb_dt->slot2));
+
+ // right now, assume this can not fail.
+ (void) ssm_ping (me_id, raddr_id);
+
+ rc = rb_slot_capture(&cb_dt->slot1);
+ if (rc == AE_ERR_CANCELLED)
+ {
+ ssm = ssm_me_owner(me_id);
+ (void) ssm_cancel(ssm, tx_id);
+ rc = rb_slot_capture(&cb_dt->slot2);
+ assert(rc == AE_SUCCESS);
+ }
+ else
+ {
+ rc = rb_slot_capture(&cb_dt->slot2);
+ }
+
+ if (evt_id)
+ {
+ *evt_id = cb_dt->evt;
+ }
+
+ rb_slot_destroy(&cb_dt->slot1);
+ rb_slot_destroy(&cb_dt->slot2);
+
+ return rc;
+}
+
+/*
+ * Function: aessm_wait
+ * This function waits for a given number of local completions on the
+ * match entry and then returns.
+ *
+ * Parameters:
+ * me - match entry generated by <aessm_link>.
+ *
+ * Returns:
+ * AE_SUCCESS - if the call was successful.
+ * AE_ERR_CANCELLED - if tthe call was cancelled.
+ * AE_ERR_* - if other error.
+ */
+__blocking int aessm_wait (ssm_me_id me_id, ssm_evt_p evt_id)
+{
+ aessm_cb_t *cb_dt;
+ ssm_id ssm;
+ ssm_cb_id cb_id;
+ int rc;
+
+ cb_id = ssm_me_cb (me_id);
+ assert(cb_id);
+
+ cb_dt = ssm_cb_data(cb_id);
+ assert(cb_dt);
+
+ assert(rb_slot_reinitialize(&cb_dt->slot1));
+ assert(rb_slot_reinitialize(&cb_dt->slot2));
+
+ rc = rb_slot_capture(&cb_dt->slot1);
+ if (rc == AE_ERR_CANCELLED)
+ {
+ rc = rb_slot_capture(&cb_dt->slot2);
+ assert(rc == AE_SUCCESS);
+ }
+ else
+ {
+ rc = rb_slot_capture(&cb_dt->slot2);
+ }
+
+ if (evt_id)
+ {
+ *evt_id = cb_dt->evt;
+ }
+
+ rb_slot_destroy(&cb_dt->slot1);
+ rb_slot_destroy(&cb_dt->slot2);
+
+ return rc;
+}
+
+/*
+ * Function: aessm_poll
+ * This function calls ssm_wait in a loop from a dedicated thread.
+ *
+ * Parameters:
+ * arg - ssm instance to drive.
+ *
+ * Returns:
+ * nothing.
+ */
+static void * aessm_poll (void *arg)
+{
+ struct timeval tv;
+ aessm_t *aessm_id;
+ int rc;
+
+ aessm_id = (aessm_t*) arg;
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 500;
+
+ while (aessm_id->state)
+ {
+ rc = ssm_wait(aessm_id->ssm, &tv);
+ assert(rc >= 0);
+ }
+
+ return NULL;
+}
+
+/*
+ * Function: aessm_initialize
+ * Initialize an SSM context, spawns a thread to push ssm_poll.
+ *
+ * Parameters:
+ * aessm_id - container for aessm data
+ *
+ * Returns:
+ * AE_SUCCESS - on success
+ */
+int aessm_initialize (aessm_t *aessm_id)
+{
+ ssmp_localmem_init_id id;
+ ssm_net_proc np;
+ ssm_addr_id la;
+ ssm_flags16 fl;
+ int rc;
+
+ /* this would be handled through configurable init parameters */
+ id = ssmp_localmem_init();
+ np = ssmp_localmem_proc;
+ la = ssmp_localmem_addr(id);
+ fl = 0;
+
+ aessm_id->laddr_id = la;
+ aessm_id->ssm = ssm_start(np, la, fl, NULL);
+ aessm_id->state = 1;
+
+ rc = pthread_create(&aessm_id->thread_id, NULL, aessm_poll, aessm_id);
+ assert(rc == 0);
+
+ return AE_SUCCESS;
+}
+
+/*
+ * Function: aessm_finalize
+ * Finalize an SSM context, joins thread created by <aessm_initailize>
+ *
+ * Parameters:
+ * aessm_id - container for aessm data
+ *
+ * Returns:
+ * AE_SUCCESS - on success
+ */
+int aessm_finalize (aessm_t *aessm_id)
+{
+ aessm_id->state = 0;
+ pthread_join(aessm_id->thread_id, NULL);
+
+ ssm_stop(aessm_id->ssm);
+ SSM_DELETE(aessm_id->laddr_id);
+
+ return AE_SUCCESS;
+}
diff --git a/src/ssm/aessm.hae b/src/ssm/aessm.hae
new file mode 100644
index 0000000..497aee9
--- /dev/null
+++ b/src/ssm/aessm.hae
@@ -0,0 +1,31 @@
+#ifndef __SSM_HAE__
+#define __SSM_HAE__
+
+#include "ssm.h"
+#include "ssmdef.h"
+#include <pthread.h>
+
+typedef struct aessm_s
+{
+ ssm_id ssm;
+ ssm_addr_id laddr_id;
+ pthread_t thread_id;
+ int state;
+} aessm_t;
+
+int aessm_initalize (aessm_t *aessm_id);
+int aessm_finalize (aessm_t *aessm_id);
+
+int aessm_link (ssm_id ssm, ssm_flags16 flags,
+ ssm_match_bits match_bits, ssm_match_bits mask_bits,
+ ssm_iovec_p data_iovec, ssm_me_pos pos, ssm_me_id anchor,
+ uint64_t count, ssm_me_id *me);
+
+__blocking int aessm_unlink(ssm_me_id me, ssm_evt_p evt);
+__blocking int aessm_put (ssm_me_id me, ssm_addr_id target_addr, ssm_evt_p evt);
+__blocking int aessm_get (ssm_me_id me, ssm_addr_id target_addr, ssm_evt_p evt);
+__blocking int aessm_msg (ssm_me_id me, ssm_addr_id target_addr, uint64_t info_a, uint64_t info_b, ssm_evt_p evt);
+__blocking int aessm_ping (ssm_me_id me, ssm_addr_id target_addr, ssm_evt_p evt);
+__blocking int aessm_wait (ssm_me_id me, ssm_evt_p evt);
+
+#endif
diff --git a/src/ssm/module.mk.in b/src/ssm/module.mk.in
new file mode 100644
index 0000000..e54fa08
--- /dev/null
+++ b/src/ssm/module.mk.in
@@ -0,0 +1,8 @@
+DIR := src/ssm
+
+ifeq ($(BUILD_SSM),1)
+
+AELIBSRC += $(DIR)/aessm.ae
+AESOP_HDR += $(DIR)/aessm.hae
+
+endif
diff --git a/src/ssm/test/module.mk.in b/src/ssm/test/module.mk.in
new file mode 100644
index 0000000..f572936
--- /dev/null
+++ b/src/ssm/test/module.mk.in
@@ -0,0 +1,10 @@
+DIR := src/ssm/test
+
+ifeq ($(BUILD_SSM),1)
+
+AETESTSRC += $(DIR)/ssmput.ae \
+ $(DIR)/ssmget.ae \
+ $(DIR)/ssmmsg.ae \
+ $(DIR)/ssmping.ae
+
+endif
diff --git a/src/ssm/test/ssmget.ae b/src/ssm/test/ssmget.ae
new file mode 100644
index 0000000..9afebe8
--- /dev/null
+++ b/src/ssm/test/ssmget.ae
@@ -0,0 +1,122 @@
+#include "aesop.h"
+#include "aesop-support.hae"
+#include "src/ssm/aessm.hae"
+
+#define DATAVAL 0xffbaffabffbaffab
+
+/*
+ * This test demonstrates a get from a remote buffer.
+ */
+static __blocking int test_main (int argc, char **argv)
+{
+ aessm_t ssm1;
+ ssm_me_id me1;
+ ssm_iovec_t iovec1;
+ uint64_t data1 = DATAVAL;
+ ssm_evt_t evt1;
+ int rc1;
+
+ aessm_t ssm2;
+ ssm_me_id me2;
+ ssm_iovec_t iovec2;
+ uint64_t data2 = 0;
+ ssm_evt_t evt2;
+ int rc2;
+
+
+ // publish buffer to get from
+
+ rc1 = aessm_initialize(&ssm1);
+ assert(rc1 == AE_SUCCESS);
+
+ iovec1.data = &data1;
+ iovec1.len = sizeof(data1);
+ iovec1.next = NULL;
+
+ rc1 = aessm_link (ssm1.ssm,
+ 0,
+ 0x1234,
+ 0,
+ &iovec1,
+ SSM_ME_POS_HEAD,
+ SSM_ME_NONE,
+ 1,
+ &me1);
+ assert(rc1 == AE_SUCCESS);
+
+ pwait
+ {
+ // wait for get
+ pbranch
+ {
+ memset(&evt1, 0, sizeof(evt1));
+
+ rc1 = aessm_wait (me1, &evt1);
+ assert(rc1 == AE_SUCCESS);
+ assert(evt1.result == SSM_RESULT_SUCCESS);
+ assert(data1 == DATAVAL);
+
+ memset(&evt1, 0, sizeof(evt1));
+
+ rc1 = aessm_unlink (me1, &evt1);
+ assert(rc1 == AE_SUCCESS);
+ assert(evt1.result == SSM_RESULT_SUCCESS);
+
+ rc1 = aessm_finalize(&ssm1);
+ assert(rc1 == AE_SUCCESS);
+ }
+
+ // get from remote
+ pbranch
+ {
+ memset(&evt2, 0, sizeof(evt2));
+
+ iovec2.data = &data2;
+ iovec2.len = sizeof(data2);
+ iovec2.next = NULL;
+
+ rc2 = aessm_initialize(&ssm2);
+ assert(rc2 == AE_SUCCESS);
+
+ rc2 = aessm_link (ssm2.ssm,
+ //SSM_ME_SEND_ONLY, // this should work?
+ 0,
+ 0x1234,
+ 0,
+ &iovec2,
+ SSM_ME_POS_HEAD,
+ SSM_ME_NONE,
+ 0,
+ &me2);
+ assert(rc2 == AE_SUCCESS);
+
+ rc2 = aessm_get(me2, ssm1.laddr_id, &evt2);
+ assert(rc2 == AE_SUCCESS);
+ assert(evt2.result == SSM_RESULT_SUCCESS);
+ assert(data2 == DATAVAL);
+
+ memset(&evt2, 0, sizeof(evt2));
+
+ rc2 = aessm_unlink(me2, &evt2);
+ assert(rc2 == AE_SUCCESS);
+ assert(evt2.result == SSM_RESULT_SUCCESS);
+
+ rc2 = aessm_finalize(&ssm2);
+ assert(rc2 == AE_SUCCESS);
+ }
+ }
+
+ printf("SUCCESS\n");
+ return 0;
+}
+
+aesop_main_set(test_main);
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ft=c ts=8 sts=4 sw=4 expandtab
+ */
diff --git a/src/ssm/test/ssmmsg.ae b/src/ssm/test/ssmmsg.ae
new file mode 100644
index 0000000..5c23dd9
--- /dev/null
+++ b/src/ssm/test/ssmmsg.ae
@@ -0,0 +1,113 @@
+#include "aesop.h"
+#include "aesop-support.hae"
+#include "src/ssm/aessm.hae"
+
+#define DATAVAL 0xffbaffabffbaffab
+
+/*
+ * This test demonstrates a msg to a remote host.
+ */
+static __blocking int test_main (int argc, char **argv)
+{
+ aessm_t ssm1;
+ ssm_me_id me1;
+ ssm_evt_t evt1;
+ int rc1;
+
+ aessm_t ssm2;
+ ssm_me_id me2;
+ ssm_evt_t evt2;
+ int rc2;
+
+ // publish match for msg
+
+ rc1 = aessm_initialize(&ssm1);
+ assert(rc1 == AE_SUCCESS);
+
+ rc1 = aessm_link (ssm1.ssm,
+ 0,
+ 0x1234,
+ 0,
+ NULL,
+ SSM_ME_POS_HEAD,
+ SSM_ME_NONE,
+ 1,
+ &me1);
+ assert(rc1 == AE_SUCCESS);
+
+ pwait
+ {
+ // wait for match
+ pbranch
+ {
+ memset(&evt1, 0, sizeof(evt1));
+
+ rc1 = aessm_wait (me1, &evt1);
+ assert(rc1 == AE_SUCCESS);
+ assert(evt1.result == SSM_RESULT_SUCCESS);
+ assert(evt1.info_a == DATAVAL);
+ assert(evt1.info_b == ~DATAVAL);
+
+ memset(&evt1, 0, sizeof(evt1));
+
+ rc1 = aessm_unlink (me1, &evt1);
+ assert(rc1 == AE_SUCCESS);
+ assert(evt1.result == SSM_RESULT_SUCCESS);
+
+ rc1 = aessm_finalize(&ssm1);
+ assert(rc1 == AE_SUCCESS);
+ }
+
+ // post msg to remote
+ pbranch
+ {
+ uint64_t dataA = DATAVAL;
+ uint64_t dataB = ~DATAVAL;
+
+ memset(&evt2, 0, sizeof(evt2));
+
+ rc2 = aessm_initialize(&ssm2);
+ assert(rc2 == AE_SUCCESS);
+
+ rc2 = aessm_link (ssm2.ssm,
+ SSM_ME_SEND_ONLY,
+ 0x1234,
+ 0,
+ NULL,
+ SSM_ME_POS_HEAD,
+ SSM_ME_NONE,
+ 0,
+ &me2);
+ assert(rc2 == AE_SUCCESS);
+
+ rc2 = aessm_msg(me2, ssm1.laddr_id, dataA, dataB, &evt2);
+ assert(rc2 == AE_SUCCESS);
+ assert(evt2.result == SSM_RESULT_SUCCESS);
+ assert(dataA == DATAVAL);
+ assert(dataB == ~DATAVAL);
+
+ memset(&evt2, 0, sizeof(evt2));
+
+ rc2 = aessm_unlink(me2, &evt2);
+ assert(rc2 == AE_SUCCESS);
+ assert(evt2.result == SSM_RESULT_SUCCESS);
+
+ rc2 = aessm_finalize(&ssm2);
+ assert(rc2 == AE_SUCCESS);
+ }
+ }
+
+ printf("SUCCESS\n");
+ return 0;
+}
+
+aesop_main_set(test_main);
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ft=c ts=8 sts=4 sw=4 expandtab
+ */
diff --git a/src/ssm/test/ssmping.ae b/src/ssm/test/ssmping.ae
new file mode 100644
index 0000000..5f511d4
--- /dev/null
+++ b/src/ssm/test/ssmping.ae
@@ -0,0 +1,82 @@
+#include "aesop.h"
+#include "aesop-support.hae"
+#include "src/ssm/aessm.hae"
+
+/*
+ * This test demonstrates a ping to a remote host.
+ */
+static __blocking int test_main (int argc, char **argv)
+{
+ aessm_t ssm1;
+ int rc1;
+
+ aessm_t ssm2;
+ ssm_me_id me2;
+ ssm_evt_t evt2;
+ int rc2;
+
+ // initialize for ping
+
+ rc1 = aessm_initialize(&ssm1);
+ assert(rc1 == AE_SUCCESS);
+
+ pwait
+ {
+ // wait for ping
+ pbranch
+ {
+ aesop_timer(1000);
+
+ rc1 = aessm_finalize(&ssm1);
+ assert(rc1 == AE_SUCCESS);
+ }
+
+ // post ping to remote
+ pbranch
+ {
+ memset(&evt2, 0, sizeof(evt2));
+
+ rc2 = aessm_initialize(&ssm2);
+ assert(rc2 == AE_SUCCESS);
+
+ rc2 = aessm_link (ssm2.ssm,
+ //SSM_ME_SEND_ONLY,
+ 0,
+ 0,
+ 0,
+ NULL,
+ SSM_ME_POS_HEAD,
+ SSM_ME_NONE,
+ 0,
+ &me2);
+ assert(rc2 == AE_SUCCESS);
+
+ rc2 = aessm_ping(me2, ssm1.laddr_id, &evt2);
+ assert(rc2 == AE_SUCCESS);
+ assert(evt2.result == SSM_RESULT_SUCCESS);
+
+ memset(&evt2, 0, sizeof(evt2));
+
+ rc2 = aessm_unlink(me2, &evt2);
+ assert(rc2 == AE_SUCCESS);
+ assert(evt2.result == SSM_RESULT_SUCCESS);
+
+ rc2 = aessm_finalize(&ssm2);
+ assert(rc2 == AE_SUCCESS);
+ }
+ }
+
+ printf("SUCCESS\n");
+ return 0;
+}
+
+aesop_main_set(test_main);
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ft=c ts=8 sts=4 sw=4 expandtab
+ */
diff --git a/src/ssm/test/ssmput.ae b/src/ssm/test/ssmput.ae
new file mode 100644
index 0000000..4d58d77
--- /dev/null
+++ b/src/ssm/test/ssmput.ae
@@ -0,0 +1,120 @@
+#include "aesop.h"
+#include "aesop-support.hae"
+#include "src/ssm/aessm.hae"
+
+#define DATAVAL 0xffbaffabffbaffab
+
+/*
+ * This test demonstrates a put into a remote buffer.
+ */
+static __blocking int test_main (int argc, char **argv)
+{
+ pwait
+ {
+ aessm_t ssm1;
+ ssm_me_id me1;
+ ssm_iovec_t iovec1;
+ uint64_t data1 = 0;
+ ssm_evt_t evt1;
+ int rc1;
+
+ aessm_t ssm2;
+ ssm_me_id me2;
+ ssm_iovec_t iovec2;
+ uint64_t data2 = DATAVAL;
+ ssm_evt_t evt2;
+ int rc2;
+
+ // publish buffer
+
+ rc1 = aessm_initialize(&ssm1);
+ assert(rc1 == AE_SUCCESS);
+
+ iovec1.data = &data1;
+ iovec1.len = sizeof(data1);
+ iovec1.next = NULL;
+
+ rc1 = aessm_link (ssm1.ssm,
+ 0,
+ 0x1234,
+ 0,
+ &iovec1,
+ SSM_ME_POS_HEAD,
+ SSM_ME_NONE,
+ 1,
+ &me1);
+ assert(rc1 == AE_SUCCESS);
+
+ // wait for put
+ pbranch
+ {
+ memset(&evt1, 0, sizeof(evt1));
+
+ rc1 = aessm_wait (me1, &evt1);
+ assert(rc1 == AE_SUCCESS);
+ assert(evt1.result == SSM_RESULT_SUCCESS);
+ assert(data1 == DATAVAL);
+
+ memset(&evt1, 0, sizeof(evt1));
+
+ rc1 = aessm_unlink (me1, &evt1);
+ assert(rc1 == AE_SUCCESS);
+ assert(evt1.result == SSM_RESULT_SUCCESS);
+
+ rc1 = aessm_finalize(&ssm1);
+ assert(rc1 == AE_SUCCESS);
+ }
+
+ // post put to remote
+ pbranch
+ {
+ memset(&evt2, 0, sizeof(evt2));
+
+ iovec2.data = &data2;
+ iovec2.len = sizeof(data2);
+ iovec2.next = NULL;
+
+ rc2 = aessm_initialize(&ssm2);
+ assert(rc2 == AE_SUCCESS);
+
+ rc2 = aessm_link (ssm2.ssm,
+ SSM_ME_SEND_ONLY,
+ 0x1234,
+ 0,
+ &iovec2,
+ SSM_ME_POS_HEAD,
+ SSM_ME_NONE,
+ 0,
+ &me2);
+ assert(rc2 == AE_SUCCESS);
+
+ rc2 = aessm_put(me2, ssm1.laddr_id, &evt2);
+ assert(rc2 == AE_SUCCESS);
+ assert(evt2.result == SSM_RESULT_SUCCESS);
+ assert(data2 == DATAVAL);
+
+ memset(&evt2, 0, sizeof(evt2));
+
+ rc2 = aessm_unlink(me2, &evt2);
+ assert(rc2 == AE_SUCCESS);
+ assert(evt2.result == SSM_RESULT_SUCCESS);
+
+ rc2 = aessm_finalize(&ssm2);
+ assert(rc2 == AE_SUCCESS);
+ }
+ }
+
+ printf("SUCCESS\n");
+ return 0;
+}
+
+aesop_main_set(test_main);
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ft=c ts=8 sts=4 sw=4 expandtab
+ */
hooks/post-receive
--
aesop Repository
1
0
Since nobody objected, I suggest we try the new concall number to see if
call quality improves.
Conference Access Number: 760-984-1000
Conference Passcode: 692481 #
Time: 3pm CET (usual time)
Dries
4
5