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 "Triton Repository".
The branch, master has been updated
via 1fe64ee85b5e2261cd4107b097d3e68e60649ceb (commit)
via 1bd62a7bc3b94ea8e69ed86a70c6ef9d4e272ab3 (commit)
via a36f6ca7f5edef7266fc28ce5a116b86e93e349c (commit)
from 9eb55db554a80aa16f44b19dbb58fe99c0945168 (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 1fe64ee85b5e2261cd4107b097d3e68e60649ceb
Author: Kevin Harms <harms(a)alcf.anl.gov>
Date: Thu Apr 28 15:49:41 2011 -0500
Missing include for cancel branches macro.
commit 1bd62a7bc3b94ea8e69ed86a70c6ef9d4e272ab3
Merge: a36f6ca7f5edef7266fc28ce5a116b86e93e349c 9eb55db554a80aa16f44b19dbb58fe99c0945168
Author: Kevin Harms <harms(a)alcf.anl.gov>
Date: Thu Apr 28 12:20:49 2011 -0500
Merge branch 'master' of git.mcs.anl.gov:triton
commit a36f6ca7f5edef7266fc28ce5a116b86e93e349c
Author: Kevin Harms <harms(a)alcf.anl.gov>
Date: Thu Apr 28 10:43:19 2011 -0500
Add a macro that handles cancelling of branches in a loop with a small wait.
Update various places in the code base to use the new macro.
-----------------------------------------------------------------------
Summary of changes:
code/src/aesop/aesop-support.hae | 13 ++++++++
code/src/aesop/module.mk.in | 2 +
code/src/aesop/parser/tests/blocking/btest-impl.c | 2 +-
.../tests/blocking/pbreak-before-blocking.ae | 13 +++-----
.../parser/tests/blocking/pbreak-immed-cancel.ae | 3 +-
code/src/aesop/parser/tests/blocking/pbreak.ae | 5 ++-
code/src/aesop/parser/tests/blocking/pbreak2.ae | 3 +-
code/src/aesop/parser/tests/blocking/pbreak3.ae | 3 +-
code/src/aesop/parser/tests/blocking/pbreak4.ae | 3 +-
code/src/aesop/parser/tests/blocking/pbreak5.ae | 3 +-
code/src/aesop/parser/tests/blocking/pbreak6.ae | 3 +-
code/src/aesop/parser/tests/blocking/pbreak7.ae | 13 ++++---
code/src/aesop/parser/tests/blocking/pbreak8.ae | 11 +++---
code/src/aesop/resource.h | 3 --
.../common/resources/timer/test/timer-cancel.ae | 20 +-----------
code/src/fakess/fakess.ae | 14 ++------
code/src/kv/kv-intern.ae | 3 +-
code/src/remote/retry-method.ae | 11 +++---
code/src/remote/service.ae | 33 +++-----------------
code/src/state/test/rosd-maint.ae | 4 --
code/src/state/test/rosd-peers.ae | 5 +--
code/src/state/test/rosd-test-funcs.ae | 2 +-
22 files changed, 70 insertions(+), 102 deletions(-)
create mode 100644 code/src/aesop/aesop-support.hae
Diff of changes:
diff --git a/code/src/aesop/aesop-support.hae b/code/src/aesop/aesop-support.hae
new file mode 100644
index 0000000..17eecbe
--- /dev/null
+++ b/code/src/aesop/aesop-support.hae
@@ -0,0 +1,13 @@
+#ifndef __AESOP_SUPPORT_HAE__
+#define __AESOP_SUPPORT_HAE__
+
+#include "src/aesop/aesop.h"
+#include "src/aesop/resource.h"
+#include "src/common/resources/timer/timer.hae"
+
+#define aesop_cancel_branches_wait() while(aesop_count_branches() > 1) { \
+ aesop_cancel_branches(); \
+ triton_timer(2); \
+ }
+
+#endif
diff --git a/code/src/aesop/module.mk.in b/code/src/aesop/module.mk.in
index b8c53ef..28a9c64 100644
--- a/code/src/aesop/module.mk.in
+++ b/code/src/aesop/module.mk.in
@@ -1,5 +1,7 @@
DIR := src/aesop
+AESOP_HDR += $(DIR)/aesop-support.hae
+
LIBSRC += $(DIR)/opcache.c \
$(DIR)/aesop.c \
$(DIR)/resource.c \
diff --git a/code/src/aesop/parser/tests/blocking/btest-impl.c b/code/src/aesop/parser/tests/blocking/btest-impl.c
index 2dce71f..61e2f13 100644
--- a/code/src/aesop/parser/tests/blocking/btest-impl.c
+++ b/code/src/aesop/parser/tests/blocking/btest-impl.c
@@ -491,7 +491,7 @@ static void btest_finalize(void)
__attribute__((constructor)) void btest_init_register(void);
__attribute__((constructor)) void btest_init_register(void)
{
- triton_init_register("aesop.blocking.test", btest_init, btest_finalize, NULL, "aesop.control");
+ triton_init_register("aesop.blocking.test", btest_init, btest_finalize, NULL, "aesop.control", "triton.resource.timer");
}
void btest_enable_immediate_cancel(void)
diff --git a/code/src/aesop/parser/tests/blocking/pbreak-before-blocking.ae b/code/src/aesop/parser/tests/blocking/pbreak-before-blocking.ae
index 458bebc..f38572c 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak-before-blocking.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak-before-blocking.ae
@@ -2,6 +2,7 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
#include <assert.h>
+#include "src/aesop/aesop-support.hae"
static __blocking void run_par1(void)
{
@@ -16,7 +17,7 @@ static __blocking void run_par1(void)
if(ret1 != 0)
{
printf("pbranch cancelled.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -34,7 +35,7 @@ static __blocking void run_par1(void)
if(ret2 != 0)
{
printf("Error in branch 2.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
assert(0);
}
@@ -43,7 +44,7 @@ static __blocking void run_par1(void)
if(ret2 != 0)
{
printf("Error in branch 2.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -58,11 +59,7 @@ static __blocking void run_par1(void)
pbranch
{
- while(aesop_count_branches() > 1)
- {
- aesop_cancel_branches();
- btest_sleep(1);
- }
+ aesop_cancel_branches_wait();
pbreak;
assert(0);
diff --git a/code/src/aesop/parser/tests/blocking/pbreak-immed-cancel.ae b/code/src/aesop/parser/tests/blocking/pbreak-immed-cancel.ae
index 31c4991..cede438 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak-immed-cancel.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak-immed-cancel.ae
@@ -1,6 +1,7 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
#include <assert.h>
+#include "src/aesop/aesop-support.hae"
static __blocking void run_pbreak(void)
{
@@ -42,7 +43,7 @@ static __blocking void run_pbreak(void)
{
ret4 = btest_sleep(4);
assert(ret4 == 0);
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
}
diff --git a/code/src/aesop/parser/tests/blocking/pbreak.ae b/code/src/aesop/parser/tests/blocking/pbreak.ae
index caf1ab4..84a84c3 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak.ae
@@ -1,6 +1,7 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
#include <assert.h>
+#include "src/aesop/aesop-support.hae"
static __blocking void run_pbreak(void)
{
@@ -39,7 +40,7 @@ static __blocking void run_pbreak(void)
{
ret4 = btest_sleep(4);
assert(ret4 == 0);
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
}
@@ -52,5 +53,5 @@ __blocking int aesop_main(int argc, char **argv)
run_pbreak();
return 0;
}
-btest_main_set(aesop_main, "btest");
+btest_main_set(aesop_main, "btest", "timer");
diff --git a/code/src/aesop/parser/tests/blocking/pbreak2.ae b/code/src/aesop/parser/tests/blocking/pbreak2.ae
index a13aff2..5e57d14 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak2.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak2.ae
@@ -1,5 +1,6 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
+#include "src/aesop/aesop-support.hae"
static __blocking void run_pbreak2(void)
{
@@ -17,7 +18,7 @@ static __blocking void run_pbreak2(void)
printf("before pbreak: a == %d!\n", a);
if(shared > 2)
{
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
ret = btest2(&a);
diff --git a/code/src/aesop/parser/tests/blocking/pbreak3.ae b/code/src/aesop/parser/tests/blocking/pbreak3.ae
index 662158b..e8bb3e9 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak3.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak3.ae
@@ -1,5 +1,6 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
+#include "src/aesop/aesop-support.hae"
static __blocking void run_pbreak3(void)
{
@@ -17,7 +18,7 @@ static __blocking void run_pbreak3(void)
if(a > 3)
{
printf("hit pbreak!\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
ret = btest2(&a);
diff --git a/code/src/aesop/parser/tests/blocking/pbreak4.ae b/code/src/aesop/parser/tests/blocking/pbreak4.ae
index 9b833ed..bb01cf5 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak4.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak4.ae
@@ -1,5 +1,6 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
+#include "src/aesop/aesop-support.hae"
static __blocking void run_pbreak4(void)
{
@@ -20,7 +21,7 @@ static __blocking void run_pbreak4(void)
if(a > 1)
{
printf("hit pbreak!\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
ret = btest3(&a);
diff --git a/code/src/aesop/parser/tests/blocking/pbreak5.ae b/code/src/aesop/parser/tests/blocking/pbreak5.ae
index 64c68e3..0014d00 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak5.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak5.ae
@@ -1,5 +1,6 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
+#include "src/aesop/aesop-support.hae"
static __blocking void run_pbreak5(void)
{
@@ -26,7 +27,7 @@ static __blocking void run_pbreak5(void)
if(b > 1)
{
printf("hit pbreak!\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
ret1 = btest3(&b);
diff --git a/code/src/aesop/parser/tests/blocking/pbreak6.ae b/code/src/aesop/parser/tests/blocking/pbreak6.ae
index 3963b61..f44d8ba 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak6.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak6.ae
@@ -1,5 +1,6 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
+#include "src/aesop/aesop-support.hae"
static __blocking void run_pbreak6(void)
{
@@ -33,7 +34,7 @@ static __blocking void run_pbreak6(void)
if(b > 1)
{
printf("hit pbreak!\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
ret1 = btest3(&b);
diff --git a/code/src/aesop/parser/tests/blocking/pbreak7.ae b/code/src/aesop/parser/tests/blocking/pbreak7.ae
index b0f8fbb..42869ee 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak7.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak7.ae
@@ -1,6 +1,7 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
#include <assert.h>
+#include "src/aesop/aesop-support.hae"
static __blocking void run_par1(void)
{
@@ -15,7 +16,7 @@ static __blocking void run_par1(void)
if(ret1 != 0)
{
printf("Error in branch 1.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -23,7 +24,7 @@ static __blocking void run_par1(void)
if(ret1 != 0)
{
printf("Error in branch 1.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
}
@@ -34,7 +35,7 @@ static __blocking void run_par1(void)
if(ret2 != 0)
{
printf("Error in branch 2.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -42,7 +43,7 @@ static __blocking void run_par1(void)
if(ret2 != 0)
{
printf("Error in branch 2.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
}
@@ -53,7 +54,7 @@ static __blocking void run_par1(void)
if(ret3 != 0)
{
printf("Error in branch 3.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -61,7 +62,7 @@ static __blocking void run_par1(void)
if(ret3 != 0)
{
printf("Error in branch 3.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
}
diff --git a/code/src/aesop/parser/tests/blocking/pbreak8.ae b/code/src/aesop/parser/tests/blocking/pbreak8.ae
index 149c665..8463d64 100644
--- a/code/src/aesop/parser/tests/blocking/pbreak8.ae
+++ b/code/src/aesop/parser/tests/blocking/pbreak8.ae
@@ -1,6 +1,7 @@
#include "src/aesop/aesop.h"
#include "src/aesop/parser/tests/blocking/btest.hae"
#include <assert.h>
+#include "src/aesop/aesop-support.hae"
static __blocking void run_par1(void)
{
@@ -15,7 +16,7 @@ static __blocking void run_par1(void)
if(ret1 != 0)
{
printf("Error in branch 1.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -23,7 +24,7 @@ static __blocking void run_par1(void)
if(ret1 != 0)
{
printf("Error in branch 1.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
}
}
@@ -33,7 +34,7 @@ static __blocking void run_par1(void)
if(ret2 != 0)
{
printf("Error in branch 2.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -41,7 +42,7 @@ static __blocking void run_par1(void)
if(ret2 != 0)
{
printf("Error in branch 2.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
}
}
@@ -51,7 +52,7 @@ static __blocking void run_par1(void)
if(ret3 != 0)
{
printf("Error in branch 3.\n");
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
pbreak;
diff --git a/code/src/aesop/resource.h b/code/src/aesop/resource.h
index cae7208..d7d880e 100644
--- a/code/src/aesop/resource.h
+++ b/code/src/aesop/resource.h
@@ -103,9 +103,6 @@ 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)
-#define aesop_cancel_branches_wait() while(aesop_count_branches() > 1) { \
- aesop_cancel_branches(); \
- triton_timer(2); }
#else
static inline ae_ret_t aesop_cancel_branches(void) { return AE_NOSYS; }
static inline int aesop_count_branches(void) { return -1; }
diff --git a/code/src/common/resources/timer/test/timer-cancel.ae b/code/src/common/resources/timer/test/timer-cancel.ae
index a70adbd..a58ef7c 100644
--- a/code/src/common/resources/timer/test/timer-cancel.ae
+++ b/code/src/common/resources/timer/test/timer-cancel.ae
@@ -2,19 +2,7 @@
#include <stdio.h>
#include "src/aesop/aesop.h"
#include "src/common/resources/timer/timer.hae"
-
-#if 0
-static __blocking void stop_branches(void)
-{
- while(aesop_count_branches() > 1)
- {
- aesop_cancel_branches();
-
- /* sleep for a bit to allow cancelation */
- triton_timer(10);
- }
-}
-#endif
+#include "src/aesop/aesop-support.hae"
static __blocking int dotimer(void)
{
@@ -35,11 +23,7 @@ static __blocking int dotimer(void)
/* shut down the other timer */
printf("canceling other branch\n");
- while(aesop_count_branches() > 1)
- {
- aesop_cancel_branches();
- triton_timer(10);
- }
+ aesop_cancel_branches_wait();
printf("cancel done\n");
}
diff --git a/code/src/fakess/fakess.ae b/code/src/fakess/fakess.ae
index 59f0e50..b25de24 100644
--- a/code/src/fakess/fakess.ae
+++ b/code/src/fakess/fakess.ae
@@ -18,6 +18,8 @@
#include "src/common/resources/timer/timer.hae"
+#include "src/aesop/aesop-support.hae"
+
// #define TRITON_FAKESS_TOKEN 64
/**
@@ -715,11 +717,7 @@ __blocking triton_ret_t triton_fakess_engine_start(void)
* pbranch
*/
triton_mutex_unlock(&fakess_mutex);
- while(aesop_count_branches() > 1)
- {
- aesop_cancel_branches();
- triton_timer(2);
- }
+ aesop_cancel_branches_wait();
if(fakess_ret != TRITON_ERR_CANCELED &&
fakess_ret != TRITON_SUCCESS)
{
@@ -744,11 +742,7 @@ __blocking triton_ret_t triton_fakess_engine_start(void)
triton_mutex_unlock(&fakess_mutex);
/* stop the other branch */
- while(aesop_count_branches() > 1)
- {
- aesop_cancel_branches();
- triton_timer(2);
- }
+ aesop_cancel_branches_wait();
}
}
diff --git a/code/src/kv/kv-intern.ae b/code/src/kv/kv-intern.ae
index 2d15b44..ebf3a46 100644
--- a/code/src/kv/kv-intern.ae
+++ b/code/src/kv/kv-intern.ae
@@ -15,6 +15,7 @@
#include "src/replicated-osd/rosd_module.h"
#include "src/remote/core_module.h"
#include "src/remote/core_stubs.hae"
+#include "src/aesop/aesop-support.hae"
__blocking triton_ret_t triton_kv_init_internal(const char * mapfile)
{
@@ -230,7 +231,7 @@ __blocking triton_ret_t triton_kv_server_stop_internal(void)
ret = remote_triton_core_server_shutdown(AER_DEFAULT_CTX, mapping->addr, in, &out);
if(ret != TRITON_SUCCESS)
{
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
}
}
}
diff --git a/code/src/remote/retry-method.ae b/code/src/remote/retry-method.ae
index f3c6291..218b21b 100644
--- a/code/src/remote/retry-method.ae
+++ b/code/src/remote/retry-method.ae
@@ -8,6 +8,7 @@
#include "src/common/traffic-cop.hae"
#include "src/aesop/hints.h"
#include "src/zeroconf/zeroconf.h"
+#include "src/aesop/aesop-support.hae"
/**
* This file implements the default remote context, which uses
@@ -262,7 +263,7 @@ static __blocking triton_ret_t retry_send_response(
if(ret != TRITON_ERR_CANCELED)
{
/* cancel the traffic cop */
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
}
}
@@ -283,7 +284,7 @@ static __blocking triton_ret_t retry_send_response(
triton_warn(triton_log_default, "response cancelled, will _not_ retry.");
}
/* Timed out sending response. Cancel it. */
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
}
}
}
@@ -547,7 +548,7 @@ static __blocking triton_ret_t retry_sendrecv(
/* In this path, either the receive succeeded or failed. We want
* to cancel the traffic_cop in either case.
*/
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
}
}
@@ -559,7 +560,7 @@ static __blocking triton_ret_t retry_sendrecv(
/* if the send failed (not canceled), then we don't want to wait
* for the timeout. Just cancel and retry.
*/
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
}
}
pbranch
@@ -579,7 +580,7 @@ static __blocking triton_ret_t retry_sendrecv(
triton_warn(triton_log_default, "remote function cancelled, will _not_ retry.");
}
/* request/response timed-out. Cancel them! */
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
}
}
}
diff --git a/code/src/remote/service.ae b/code/src/remote/service.ae
index 6f6e154..7b4613b 100644
--- a/code/src/remote/service.ae
+++ b/code/src/remote/service.ae
@@ -10,6 +10,7 @@
#include "src/aesop/hints.h"
#include "src/common/resources/scheduling/sched.hae"
#include "src/common/resources/timer/timer.hae"
+#include "src/aesop/aesop-support.hae"
triton_debug_mask_t remote_service_dbg_mask;
@@ -48,7 +49,6 @@ static int service_id_equal(const void *k, struct triton_hash_link *l)
static uint64_t request_message_size;
static uint32_t max_requests;
static uint32_t inprogress_wait_time;
-static uint32_t inprogress_timeout;
static int service_initialized = 0;
@@ -99,16 +99,6 @@ static triton_ret_t inprogress_wait_time_updater(const char *k, const char *v)
return TRITON_SUCCESS;
}
-static triton_ret_t inprogress_timeout_updater(const char *k, const char *v)
-{
- assert(!strcmp(k, "triton.remote.service.inprogress_timeout"));
- triton_mutex_lock(&aer_service_mutex);
- inprogress_timeout = atoi(v);
- triton_mutex_unlock(&aer_service_mutex);
-
- return TRITON_SUCCESS;
-}
-
/* the constructor attribute allows this init function to be called implicitly by the program
* before main is called. The integer priority specifies the order for when the constructor
* should be called. In the case of real services, their priorities should be greater than 3.
@@ -143,10 +133,6 @@ triton_ret_t aer_service_init(void)
"Time to sleep (secs) on exit for in-progress operations before checking for completion again");
triton_error_assert(ret);
- ret = triton_zeroconf_register("triton.remote.service.inprogress_timeout", "1000", inprogress_timeout_updater,
- "Time to wait (secs) on exit for cancelled unexpected receives before trying to cancel again");
- triton_error_assert(ret);
-
if(service_table == NULL)
{
service_table = triton_hash_init(service_id_equal, triton_hash_64bit_hash, 8192);
@@ -426,16 +412,7 @@ __blocking void aer_service_engine_start(aer_remote_ctx_t rctx)
}
/* no more ops in progress! cancel waiting receives! */
- aesop_cancel_branches();
-
- /* wait for receives that haven't been fully cancelled.
- * TODO: if the receives don't cancel this loop will never end...
- */
- while(aesop_count_branches() > 1)
- {
- triton_timer(inprogress_timeout);
- aesop_cancel_branches();
- }
+ aesop_cancel_branches_wait();
}
}
@@ -499,7 +476,7 @@ __blocking triton_ret_t aer_service_requests(aer_remote_ctx_t ctx, int request_c
if(ret[i] != TRITON_SUCCESS)
{
/* TODO: report error */
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -508,7 +485,7 @@ __blocking triton_ret_t aer_service_requests(aer_remote_ctx_t ctx, int request_c
{
aer_message_destroy(ctx, &inmessage);
/* TODO: report error */
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
@@ -516,7 +493,7 @@ __blocking triton_ret_t aer_service_requests(aer_remote_ctx_t ctx, int request_c
if(ret[i] != TRITON_SUCCESS)
{
/* TODO: handle error */
- aesop_cancel_branches();
+ aesop_cancel_branches_wait();
pbreak;
}
diff --git a/code/src/state/test/rosd-maint.ae b/code/src/state/test/rosd-maint.ae
index d0422d5..c83f49a 100644
--- a/code/src/state/test/rosd-maint.ae
+++ b/code/src/state/test/rosd-maint.ae
@@ -47,10 +47,6 @@
#define SVR_POLL_TIMEOUT 1000
#define CLIENT_POLL_TIMEOUT 1000
-#define CANCEL while(aesop_count_branches() > 1) { \
- aesop_cancel_branches(); \
- triton_timer(2); }
-
int nobjects = 0;
int nconcurrent = 0;
char db_path[PATH_MAX];
diff --git a/code/src/state/test/rosd-peers.ae b/code/src/state/test/rosd-peers.ae
index e1a59eb..39b3c82 100644
--- a/code/src/state/test/rosd-peers.ae
+++ b/code/src/state/test/rosd-peers.ae
@@ -32,6 +32,7 @@
#include "src/common/triton-init.h"
#include "src/versioned-osd/prototype/versioned-osd.hae"
+#include "src/aesop/aesop-support.hae"
/* include server-side rosd skeletons */
#include "src/replicated-osd/rosd_module.h"
@@ -46,10 +47,6 @@
#define SVR_POLL_TIMEOUT 1000
#define CLIENT_POLL_TIMEOUT 1000
-#define CANCEL while(aesop_count_branches() > 1) { \
- aesop_cancel_branches(); \
- triton_timer(2); }
-
int nobjects = 0;
int nconcurrent = 0;
char db_path[PATH_MAX];
diff --git a/code/src/state/test/rosd-test-funcs.ae b/code/src/state/test/rosd-test-funcs.ae
index fcebea0..d662690 100644
--- a/code/src/state/test/rosd-test-funcs.ae
+++ b/code/src/state/test/rosd-test-funcs.ae
@@ -73,7 +73,7 @@ __blocking void monitor_state()
{
triton_timer(1000);
}
- CANCEL;
+ aesop_cancel_branches_wait();
}
}
hooks/post-receive
--
Triton Repository