[Gs-commits] Triton Repository branch, master, updated. ea05c744488a6a7d2e907bcee9531cfe91a95959
4 Mar
2010
4 Mar
'10
1:06 p.m.
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 ea05c744488a6a7d2e907bcee9531cfe91a95959 (commit)
from 047e6c5d12a04f15d03344c8ec0a6b32e0136480 (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 ea05c744488a6a7d2e907bcee9531cfe91a95959
Author: Samuel Lang <[email protected]>
Date: Thu Mar 4 13:05:33 2010 -0600
build fixes.
-----------------------------------------------------------------------
Summary of changes:
code/Makefile.in | 16 ++--
code/autom4te.cache/output.0 | 46 +++++-----
code/autom4te.cache/output.1 | 46 +++++-----
code/autom4te.cache/requests | 16 ++--
code/autom4te.cache/traces.1 | 8 +-
code/configure | 46 +++++-----
code/configure.ac | 2 +-
code/src/aesop/ae-remote-parser.h | 43 ++++++---
code/src/aesop/parser/CGen.lhs | 21 ++++-
code/src/aesop/parser/CParse.lhs | 6 +
code/src/aesop/parser/Serialize.hs | 10 +-
code/src/aesop/parser/ae-blocking-parser.lhs | 4 +-
code/src/aesop/parser/ae-remote-parser.lhs | 52 +++++-----
code/src/aesop/parser/tests/remote/test-remote.aer | 15 +++-
.../common/resources/scheduling/test/coalesce.ae | 2 +-
code/src/common/triton-buffer.h | 9 ++-
code/src/common/triton-log.h | 14 ++--
code/src/net/triton-message.hae | 4 +-
code/src/remote/encoding-pw.h | 2 +-
code/src/remote/message.ae | 99 +++++++++++++++++++-
code/src/remote/message.hae | 4 +
code/src/remote/service.ae | 35 +++++++-
code/src/remote/service.hae | 8 +-
code/triton-config.h.in | 22 ++--
24 files changed, 355 insertions(+), 175 deletions(-)
Diff of changes:
diff --git a/code/Makefile.in b/code/Makefile.in
index 92c3eb7..ec336b3 100644
--- a/code/Makefile.in
+++ b/code/Makefile.in
@@ -333,17 +333,17 @@ $(TESTOBJS_DEPENDS) $(LIBOBJS_DEPENDS) $(TESTLIBOBJS_DEPENDS): %.d: %.c
$(Q) " DEP $@"
$(E)$(CC) -MT $(patsubst %.d,%.o,$@) -MM -MG -MF $@ $< $(LIBCFLAGS) $(CFLAGS) $(CWARNS) $(call MODCFLAGS,$<)
-$(TEST): %: %.o lib/libgs.a lib/libgstest.a
+$(TEST): %: %.o lib/libtriton.a lib/libtriton-test.a
$(Q) " LD $@"
$(E)$(call MCC_C,$<) \
-o $@ $< $(LDFLAGS) $(LIBS) \
- -L$(builddir)/lib -lgstest -lgs
+ -L$(builddir)/lib -ltriton-test -ltriton
-$(AETEST): %: %.o lib/libgs.a lib/libgstest.a
+$(AETEST): %: %.o lib/libtriton.a lib/libtriton-test.a
$(Q) " LD $@"
$(E)$(call MCC_AE,$<) \
-o $@ $< $(LDFLAGS) $(LIBS) \
- -L$(builddir)/lib -lgstest -lgs \
+ -L$(builddir)/lib -ltriton-test -ltriton \
$(call MODLDFLAGS_AE,$<) $(call MODLIBS_AE,$<)
$(LIBOBJS) $(TESTOBJS): %.o: %.d
@@ -365,14 +365,14 @@ $(TESTLIBOBJS): %.o: %.d
$(call MODCFLAGS_C,$(patsubst %.d,%.c,$<)) \
$(srcdir)/$(patsubst %.d,%.c,$<)
-LIBRARIES=lib/libgs.a lib/libgstest.a
+LIBRARIES=lib/libtriton.a lib/libtriton-test.a
-lib/libgs.a: $(AELIBOBJS) $(REMOTE_LIBOBJS) $(REMOTE_LIB_MODOBJS) $(LIBOBJS)
+lib/libtriton.a: $(AELIBOBJS) $(REMOTE_LIBOBJS) $(REMOTE_LIB_MODOBJS) $(LIBOBJS)
$(Q) " RANLIB $@"
$(E)$(INSTALL) -d lib
$(E)ar rcs $@ $(AELIBOBJS) $(REMOTE_LIBOBJS) $(REMOTE_LIB_MODOBJS) $(LIBOBJS)
-lib/libgstest.a: $(AETESTLIBOBJS) $(REMOTE_TESTLIBOBJS) $(REMOTE_TESTLIB_MODOBJS) $(TESTLIBOBJS)
+lib/libtriton-test.a: $(AETESTLIBOBJS) $(REMOTE_TESTLIBOBJS) $(REMOTE_TESTLIB_MODOBJS) $(TESTLIBOBJS)
$(Q) " RANLIB $@"
$(E)$(INSTALL) -d lib
$(E)ar rcs $@ $(AETESTLIBOBJS) $(REMOTE_TESTLIBOBJS) $(REMOTE_TESTLIB_MODOBJS) $(TESTLIBOBJS)
@@ -464,7 +464,7 @@ $(REMOTE_TESTOBJS) $(REMOTE_OBJS): %.o: $(HSBIN) %.d %.aer.r.s
$(CFLAGS) $(CWARNS) -Wno-redundant-decls $(call MODCFLAGS_AE,$*) $*.aer.r.s
%.aer.dummyobj: %.d
- $(Q) " REMOTECC $*"
+ $(Q) " REMOTECC $*"
$(E)$(call MCC_AE,$<) -D__remote="" -D__blocking="" \
-Dpwait="while(0)" -Dpbranch="" -Dpbreak="break" -Dpprivate="" -Dpshared=""\
-I$(srcdir)/include/ -x c -c -o $@ $(LIBCFLAGS) \
diff --git a/code/autom4te.cache/output.0 b/code/autom4te.cache/output.0
index bea933f..1845017 100644
--- a/code/autom4te.cache/output.0
+++ b/code/autom4te.cache/output.0
@@ -1,8 +1,8 @@
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.61 for grayskull 0.1.1.
+@%:@ Generated by GNU Autoconf 2.61 for triton 0.1.1.
@%:@
-@%:@ Report bugs to <[email protected]>.
+@%:@ Report bugs to <[email protected]>.
@%:@
@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,11 +572,11 @@ MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
-PACKAGE_NAME='grayskull'
-PACKAGE_TARNAME='grayskull'
+PACKAGE_NAME='triton'
+PACKAGE_TARNAME='triton'
PACKAGE_VERSION='0.1.1'
-PACKAGE_STRING='grayskull 0.1.1'
-PACKAGE_BUGREPORT='[email protected]'
+PACKAGE_STRING='triton 0.1.1'
+PACKAGE_BUGREPORT='[email protected]'
# Factoring default headers for most tests.
ac_includes_default="\
@@ -601,7 +601,7 @@ ac_includes_default="\
# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINTRITON_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_INTTYPES_H
@@ -1199,7 +1199,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures grayskull 0.1.1 to adapt to many kinds of systems.
+\`configure' configures triton 0.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1247,7 +1247,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root @<:@DATAROOTDIR/doc/grayskull@:>@
+ --docdir=DIR documentation root @<:@DATAROOTDIR/doc/triton@:>@
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1260,7 +1260,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of grayskull 0.1.1:";;
+ short | recursive ) echo "Configuration of triton 0.1.1:";;
esac
cat <<\_ACEOF
@@ -1295,7 +1295,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <[email protected]>.
+Report bugs to <[email protected]>.
_ACEOF
ac_status=$?
fi
@@ -1356,7 +1356,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-grayskull configure 0.1.1
+triton configure 0.1.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1370,7 +1370,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by grayskull $as_me 0.1.1, which was
+It was created by triton $as_me 0.1.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -1742,7 +1742,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-ac_config_headers="$ac_config_headers gs-config.h"
+ac_config_headers="$ac_config_headers triton-config.h"
ac_aux_dir=
for ac_dir in maint/config "$srcdir"/maint/config; do
@@ -6203,9 +6203,9 @@ echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2
{ echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-@%:@@%:@ ---------------------------------- @%:@@%:@
-@%:@@%:@ Report this to [email protected] @%:@@%:@
-@%:@@%:@ ---------------------------------- @%:@@%:@
+@%:@@%:@ ------------------------------------- @%:@@%:@
+@%:@@%:@ Report this to [email protected] @%:@@%:@
+@%:@@%:@ ------------------------------------- @%:@@%:@
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -6476,9 +6476,9 @@ echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2
{ echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-@%:@@%:@ ---------------------------------- @%:@@%:@
-@%:@@%:@ Report this to [email protected] @%:@@%:@
-@%:@@%:@ ---------------------------------- @%:@@%:@
+@%:@@%:@ ------------------------------------- @%:@@%:@
+@%:@@%:@ Report this to [email protected] @%:@@%:@
+@%:@@%:@ ------------------------------------- @%:@@%:@
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -7057,7 +7057,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by grayskull $as_me 0.1.1, which was
+This file was extended by triton $as_me 0.1.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7106,7 +7106,7 @@ Report bugs to <[email protected]>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-grayskull config.status 0.1.1
+triton config.status 0.1.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -7214,7 +7214,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "gs-config.h") CONFIG_HEADERS="$CONFIG_HEADERS gs-config.h" ;;
+ "triton-config.h") CONFIG_HEADERS="$CONFIG_HEADERS triton-config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/common/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/module.mk" ;;
"src/common/tests/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/tests/module.mk" ;;
diff --git a/code/autom4te.cache/output.1 b/code/autom4te.cache/output.1
index bea933f..1845017 100644
--- a/code/autom4te.cache/output.1
+++ b/code/autom4te.cache/output.1
@@ -1,8 +1,8 @@
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.61 for grayskull 0.1.1.
+@%:@ Generated by GNU Autoconf 2.61 for triton 0.1.1.
@%:@
-@%:@ Report bugs to <[email protected]>.
+@%:@ Report bugs to <[email protected]>.
@%:@
@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,11 +572,11 @@ MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
-PACKAGE_NAME='grayskull'
-PACKAGE_TARNAME='grayskull'
+PACKAGE_NAME='triton'
+PACKAGE_TARNAME='triton'
PACKAGE_VERSION='0.1.1'
-PACKAGE_STRING='grayskull 0.1.1'
-PACKAGE_BUGREPORT='[email protected]'
+PACKAGE_STRING='triton 0.1.1'
+PACKAGE_BUGREPORT='[email protected]'
# Factoring default headers for most tests.
ac_includes_default="\
@@ -601,7 +601,7 @@ ac_includes_default="\
# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINTRITON_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_INTTYPES_H
@@ -1199,7 +1199,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures grayskull 0.1.1 to adapt to many kinds of systems.
+\`configure' configures triton 0.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1247,7 +1247,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root @<:@DATAROOTDIR/doc/grayskull@:>@
+ --docdir=DIR documentation root @<:@DATAROOTDIR/doc/triton@:>@
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1260,7 +1260,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of grayskull 0.1.1:";;
+ short | recursive ) echo "Configuration of triton 0.1.1:";;
esac
cat <<\_ACEOF
@@ -1295,7 +1295,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <[email protected]>.
+Report bugs to <[email protected]>.
_ACEOF
ac_status=$?
fi
@@ -1356,7 +1356,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-grayskull configure 0.1.1
+triton configure 0.1.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1370,7 +1370,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by grayskull $as_me 0.1.1, which was
+It was created by triton $as_me 0.1.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -1742,7 +1742,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-ac_config_headers="$ac_config_headers gs-config.h"
+ac_config_headers="$ac_config_headers triton-config.h"
ac_aux_dir=
for ac_dir in maint/config "$srcdir"/maint/config; do
@@ -6203,9 +6203,9 @@ echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2
{ echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-@%:@@%:@ ---------------------------------- @%:@@%:@
-@%:@@%:@ Report this to [email protected] @%:@@%:@
-@%:@@%:@ ---------------------------------- @%:@@%:@
+@%:@@%:@ ------------------------------------- @%:@@%:@
+@%:@@%:@ Report this to [email protected] @%:@@%:@
+@%:@@%:@ ------------------------------------- @%:@@%:@
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -6476,9 +6476,9 @@ echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2
{ echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-@%:@@%:@ ---------------------------------- @%:@@%:@
-@%:@@%:@ Report this to [email protected] @%:@@%:@
-@%:@@%:@ ---------------------------------- @%:@@%:@
+@%:@@%:@ ------------------------------------- @%:@@%:@
+@%:@@%:@ Report this to [email protected] @%:@@%:@
+@%:@@%:@ ------------------------------------- @%:@@%:@
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -7057,7 +7057,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by grayskull $as_me 0.1.1, which was
+This file was extended by triton $as_me 0.1.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7106,7 +7106,7 @@ Report bugs to <[email protected]>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-grayskull config.status 0.1.1
+triton config.status 0.1.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -7214,7 +7214,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "gs-config.h") CONFIG_HEADERS="$CONFIG_HEADERS gs-config.h" ;;
+ "triton-config.h") CONFIG_HEADERS="$CONFIG_HEADERS triton-config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/common/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/module.mk" ;;
"src/common/tests/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/tests/module.mk" ;;
diff --git a/code/autom4te.cache/requests b/code/autom4te.cache/requests
index 8078591..2500fb6 100644
--- a/code/autom4te.cache/requests
+++ b/code/autom4te.cache/requests
@@ -16,22 +16,22 @@
'configure.ac'
],
{
- 'm4_pattern_allow' => 1,
'_AM_AUTOCONF_VERSION' => 1,
- 'TRITON_DOWNLOAD_SQLITE' => 1,
+ 'm4_pattern_allow' => 1,
'm4_pattern_forbid' => 1,
- 'TRITON_SQLITE_PKG_CONFIG' => 1,
'include' => 1,
'AC_DEFUN_ONCE' => 1,
- 'TRITON_SQLITE_DIR_CONFIG' => 1,
- 'm4_include' => 1,
'AC_DEFUN' => 1,
'AX_BERKELEY_DB' => 1,
- '_m4_warn' => 1,
'TRITON_SQLITE_VERNUM_PARSE' => 1,
- 'TRITON_SQLITE_MIN_VERNUM_PARSE' => 1,
+ 'TRITON_LIB_SQLITE' => 1,
+ 'm4_include' => 1,
+ 'TRITON_SQLITE_PKG_CONFIG' => 1,
+ 'TRITON_SQLITE_DIR_CONFIG' => 1,
+ '_m4_warn' => 1,
'AU_DEFUN' => 1,
- 'TRITON_LIB_SQLITE' => 1
+ 'TRITON_DOWNLOAD_SQLITE' => 1,
+ 'TRITON_SQLITE_MIN_VERNUM_PARSE' => 1
}
], 'Autom4te::Request' ),
bless( [
diff --git a/code/autom4te.cache/traces.1 b/code/autom4te.cache/traces.1
index 0a9a6b2..812502e 100644
--- a/code/autom4te.cache/traces.1
+++ b/code/autom4te.cache/traces.1
@@ -1,6 +1,6 @@
m4trace:aclocal.m4:14: -1- m4_include([maint/config/bdb.m4])
m4trace:aclocal.m4:15: -1- m4_include([maint/config/sqlite.m4])
-m4trace:configure.ac:16: -1- AC_INIT([grayskull], [0.1.1], [[email protected]])
+m4trace:configure.ac:16: -1- AC_INIT([triton], [0.1.1], [[email protected]])
m4trace:configure.ac:16: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:16: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:16: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
@@ -156,7 +156,7 @@ m4trace:configure.ac:22: -1- AC_DEFINE_TRACE_LITERAL([TRITON_VERSION_SUB])
m4trace:configure.ac:22: -1- m4_pattern_allow([^TRITON_VERSION_SUB$])
m4trace:configure.ac:22: -1- AH_OUTPUT([TRITON_VERSION_SUB], [/* sub version number */
#undef TRITON_VERSION_SUB])
-m4trace:configure.ac:24: -1- AC_CONFIG_HEADERS([gs-config.h])
+m4trace:configure.ac:24: -1- AC_CONFIG_HEADERS([triton-config.h])
m4trace:configure.ac:25: -1- AC_CONFIG_AUX_DIR([maint/config])
m4trace:configure.ac:27: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.ac:27: -1- AC_SUBST([INSTALL_PROGRAM])
@@ -239,8 +239,8 @@ m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you h
#undef HAVE_STRING_H])
m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H])
-m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_STRINTRITON_H], [/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINTRITON_H])
+m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H])
m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H])
m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
diff --git a/code/configure b/code/configure
index d4ac3cd..71f7f72 100755
--- a/code/configure
+++ b/code/configure
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for grayskull 0.1.1.
+# Generated by GNU Autoconf 2.61 for triton 0.1.1.
#
-# Report bugs to <[email protected]>.
+# Report bugs to <[email protected]>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,11 +572,11 @@ MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
-PACKAGE_NAME='grayskull'
-PACKAGE_TARNAME='grayskull'
+PACKAGE_NAME='triton'
+PACKAGE_TARNAME='triton'
PACKAGE_VERSION='0.1.1'
-PACKAGE_STRING='grayskull 0.1.1'
-PACKAGE_BUGREPORT='[email protected]'
+PACKAGE_STRING='triton 0.1.1'
+PACKAGE_BUGREPORT='[email protected]'
# Factoring default headers for most tests.
ac_includes_default="\
@@ -601,7 +601,7 @@ ac_includes_default="\
# endif
# include <string.h>
#endif
-#ifdef HAVE_STRINTRITON_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_INTTYPES_H
@@ -1199,7 +1199,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures grayskull 0.1.1 to adapt to many kinds of systems.
+\`configure' configures triton 0.1.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1247,7 +1247,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/grayskull]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/triton]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1260,7 +1260,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of grayskull 0.1.1:";;
+ short | recursive ) echo "Configuration of triton 0.1.1:";;
esac
cat <<\_ACEOF
@@ -1295,7 +1295,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <[email protected]>.
+Report bugs to <[email protected]>.
_ACEOF
ac_status=$?
fi
@@ -1356,7 +1356,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-grayskull configure 0.1.1
+triton configure 0.1.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1370,7 +1370,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by grayskull $as_me 0.1.1, which was
+It was created by triton $as_me 0.1.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -1742,7 +1742,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-ac_config_headers="$ac_config_headers gs-config.h"
+ac_config_headers="$ac_config_headers triton-config.h"
ac_aux_dir=
for ac_dir in maint/config "$srcdir"/maint/config; do
@@ -6203,9 +6203,9 @@ echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2
{ echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ---------------------------------- ##
-## Report this to [email protected] ##
-## ---------------------------------- ##
+## ------------------------------------- ##
+## Report this to [email protected] ##
+## ------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -6476,9 +6476,9 @@ echo "$as_me: WARNING: sqlite3.h: proceeding with the preprocessor's result" >&2
{ echo "$as_me:$LINENO: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sqlite3.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
-## ---------------------------------- ##
-## Report this to [email protected] ##
-## ---------------------------------- ##
+## ------------------------------------- ##
+## Report this to [email protected] ##
+## ------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -7057,7 +7057,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by grayskull $as_me 0.1.1, which was
+This file was extended by triton $as_me 0.1.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7106,7 +7106,7 @@ Report bugs to <[email protected]>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-grayskull config.status 0.1.1
+triton config.status 0.1.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -7214,7 +7214,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
- "gs-config.h") CONFIG_HEADERS="$CONFIG_HEADERS gs-config.h" ;;
+ "triton-config.h") CONFIG_HEADERS="$CONFIG_HEADERS triton-config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/common/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/module.mk" ;;
"src/common/tests/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/tests/module.mk" ;;
diff --git a/code/configure.ac b/code/configure.ac
index 9907b6b..287bb8e 100644
--- a/code/configure.ac
+++ b/code/configure.ac
@@ -21,7 +21,7 @@ AC_DEFINE_UNQUOTED(TRITON_VERSION_MAJOR, $TRITON_MAJOR, major version number)
AC_DEFINE_UNQUOTED(TRITON_VERSION_MINOR, $TRITON_MINOR, minor version number)
AC_DEFINE_UNQUOTED(TRITON_VERSION_SUB, $TRITON_SUB, sub version number)
-AC_CONFIG_HEADER(gs-config.h)
+AC_CONFIG_HEADER(triton-config.h)
AC_CONFIG_AUX_DIR(maint/config)
AC_PROG_INSTALL
diff --git a/code/src/aesop/ae-remote-parser.h b/code/src/aesop/ae-remote-parser.h
index dca83e9..637a718 100644
--- a/code/src/aesop/ae-remote-parser.h
+++ b/code/src/aesop/ae-remote-parser.h
@@ -244,6 +244,7 @@
aer_message_destroy(&send_message); \
return ret; \
} \
+ triton_buffer_fix_size(&send_message.buffer); \
ret = aer_message_init(&recv_message, AE_REMOTE_MAX_RESPONSE_SIZE, __get_op_id_##__fname__()); \
if(ret != TRITON_SUCCESS) \
{ \
@@ -265,15 +266,9 @@
#define AER_MK_STUB_PTR_BLOCK(__fname__, __intype__, __inname__, __outtype__, __outname__) \
{ \
- ret = aer_message_init(&send_message); \
- if(ret != TRITON_SUCCESS) \
- { \
- return ret; \
- } \
- ret = aer_message_set_op(&send_message, __get_op_id_##__fname__()); \
+ ret = aer_message_init(&send_message, AE_REMOTE_MAX_REQUEST_SIZE, __get_op_id_##__fname__()); \
if(ret != TRITON_SUCCESS) \
{ \
- aer_message_destroy(&send_message); \
return ret; \
} \
ret = aer_encode_##__intype__(&(send_message.buffer), #__inname__, __inname__); \
@@ -282,7 +277,7 @@
aer_message_destroy(&send_message); \
return ret; \
} \
- ret = aer_message_init(&recv_message); \
+ ret = aer_message_init(&recv_message, AE_REMOTE_MAX_RESPONSE_SIZE, __get_op_id_##__fname__()); \
if(ret != TRITON_SUCCESS) \
{ \
aer_message_destroy(&send_message); \
@@ -304,13 +299,19 @@
#define AER_MK_SERVICE_DECL(__fname__) \
__blocking triton_ret_t __service_##__fname__(aer_message_t *send_message, aer_message_t *recv_message);
-#define AER_MK_SERVICE_FNDEF(__fname__, __intype__, __inname__, __outtype__, __outname__) \
+#define AER_MK_SERVICE_FNDEF(__fname__, \
+ __intype__, \
+ __incanontype__, \
+ __inname__, \
+ __outtype__, \
+ __outcanontype__, \
+ __outname__) \
__blocking triton_ret_t __service_##__fname__(aer_message_t *send_message, aer_message_t *recv_message) \
{ \
triton_ret_t ret; \
__intype__ __inname__; \
__outtype__ __outname__; \
- ret = aer_decode_##__intype__(&(recv_message->buffer), NULL, &__inname__); \
+ ret = aer_decode_##__incanontype__(&(recv_message->buffer), NULL, &__inname__); \
if(ret != TRITON_SUCCESS) \
{ \
return ret; \
@@ -320,7 +321,7 @@ __blocking triton_ret_t __service_##__fname__(aer_message_t *send_message, aer_m
{ \
return ret; \
} \
- ret = aer_encode_##__outtype__(&(send_message->buffer), #__outname__, &__outname__); \
+ ret = aer_encode_##__outcanontype__(&(send_message->buffer), #__outname__, &__outname__); \
if(ret != TRITON_SUCCESS) \
{ \
aer_message_destroy(send_message); \
@@ -329,13 +330,19 @@ __blocking triton_ret_t __service_##__fname__(aer_message_t *send_message, aer_m
return ret; \
}
-#define AER_MK_SERVICE_FNDEF_INPTR(__fname__, __intype__, __inname__, __outtype__, __outname__) \
+#define AER_MK_SERVICE_FNDEF_INPTR(__fname__, \
+ __intype__, \
+ __incanontype__, \
+ __inname__, \
+ __outtype__, \
+ __outcanontype__, \
+ __outname__) \
__blocking triton_ret_t __service_##__fname__(aer_message_t *send_message, aer_message_t *recv_message) \
{ \
triton_ret_t ret; \
__intype__ __inname__; \
__outtype__ __outname__; \
- ret = aer_decode_##__intype__(&(recv_message->buffer), NULL, &__inname__); \
+ ret = aer_decode_##__incanontype__(&(recv_message->buffer), NULL, &__inname__); \
if(ret != TRITON_SUCCESS) \
{ \
return ret; \
@@ -345,7 +352,7 @@ __blocking triton_ret_t __service_##__fname__(aer_message_t *send_message, aer_m
{ \
return ret; \
} \
- ret = aer_encode_##__outtype__(&(send_message->buffer), #__outname__, &__outname__); \
+ ret = aer_encode_##__outcanontype__(&(send_message->buffer), #__outname__, &__outname__); \
if(ret != TRITON_SUCCESS) \
{ \
aer_message_destroy(send_message); \
@@ -381,4 +388,12 @@ __blocking triton_ret_t __service_##__fname__(aer_message_t *send_message, aer_m
#define AER_MK_STATIC_OP_DECL(__fname__) \
static uint64_t __op_id_##__fname__ = 0;
+#define AER_MK_REG_CTOR_FNDEF(__service_name__) \
+__attribute__((constructor)) void aer_remote_static_initializer_##__service_name__(void) \
+{ \
+ triton_ret_t ret; \
+ ret = aer_remote_register_##__service_name__(); \
+ assert(ret == TRITON_SUCCESS); \
+}
+
#endif
diff --git a/code/src/aesop/parser/CGen.lhs b/code/src/aesop/parser/CGen.lhs
index c78aa85..524be6f 100644
--- a/code/src/aesop/parser/CGen.lhs
+++ b/code/src/aesop/parser/CGen.lhs
@@ -79,8 +79,14 @@ Functions to generate AST objects from C template code
> (Right ios) -> do { removeFile fp; return ios }
> (Left error) -> trace ("Preprocessor failed:" ++ (show error)) $ assert False $ return Data.ByteString.empty
+> swapNodeInfo :: NodeInfo -> NodeInfo -> NodeInfo
+> swapNodeInfo newni oldni = newni
+
+> swapNodeInfoInStmts :: NodeInfo -> [CStat] -> [CStat]
+> swapNodeInfoInStmts ni stmts = map (everywhere (mkT $ swapNodeInfo ni)) stmts
+
> mkStmtFromCPPMacro :: [FilePath] -> [(String, String)] -> FilePath -> NodeInfo -> String -> [String] -> [CStat]
-> mkStmtFromCPPMacro idirs defines ifile ni macro params = stmts
+> mkStmtFromCPPMacro idirs defines ifile ni macro params = swapNodeInfoInStmts ni stmts
> where preproc = unsafePerformIO $ doStmtPP idirs defines ifile ni macro params
> strproc = Data.ByteString.Char8.unpack preproc
> parsedResult = (execParser_ translUnitP preproc $ posOfNode ni)
@@ -90,7 +96,8 @@ Functions to generate AST objects from C template code
> (Right (CTranslUnit edecls _)) -> case (last edecls) of
> (CFDefExt (CFunDef _ _ _ stmt _)) -> [stmt]
> _ -> []
-> (Left pe) -> trace ("Error generating function definitions from macro '" ++ macro ++ "': " ++ strproc ++ (show pe))
+> (Left pe) -> trace ("Error generating function definitions from macro '" ++
+> macro ++ "': " ++ strproc ++ (show pe))
> (assert False [])
> declDummyName :: String
@@ -116,8 +123,11 @@ Functions to generate AST objects from C template code
> dname (CDeclExt d) = (/=) declDummyName $ identToString (getCDeclName d)
> dname _ = False
+> swapNodeInfoInDecls :: NodeInfo -> [CDecl] -> [CDecl]
+> swapNodeInfoInDecls ni decls = map (everywhere (mkT $ swapNodeInfo ni)) decls
+
> mkDeclsFromCPPMacro :: [FilePath] -> [(String, String)] -> FilePath -> NodeInfo -> String -> [String] -> [CDecl]
-> mkDeclsFromCPPMacro idirs defines ifile ni macro params = decls
+> mkDeclsFromCPPMacro idirs defines ifile ni macro params = swapNodeInfoInDecls ni decls
> where preproc = unsafePerformIO $ doDeclPP idirs defines ifile ni macro params
> strproc = Data.ByteString.Char8.unpack preproc
> parsedResult = (execParser_ translUnitP preproc $ posOfNode ni)
@@ -156,8 +166,11 @@ Functions to generate AST objects from C template code
> insertStmtBlock :: (Data a) => String -> [CStat] -> a -> a
> insertStmtBlock name insert a = everywhere (mkT $ swapStmts name insert) a
+> swapNodeInfoInExtDecls :: NodeInfo -> [CExtDecl] -> [CExtDecl]
+> swapNodeInfoInExtDecls ni edecls = map (everywhere (mkT $ swapNodeInfo ni)) edecls
+
> mkFunDefFromCPPMacro :: [FilePath] -> [(String, String)] -> FilePath -> NodeInfo -> String -> [String] -> String -> [CStat] -> [CExtDecl]
-> mkFunDefFromCPPMacro idirs defines ifile ni macro params insertName insertStmts = [completedFunDef]
+> mkFunDefFromCPPMacro idirs defines ifile ni macro params insertName insertStmts = swapNodeInfoInExtDecls ni [completedFunDef]
> where preproc = unsafePerformIO $ doFunDefPP idirs defines ifile ni macro params
> strproc = Data.ByteString.Char8.unpack preproc
> parsedResult = (execParser_ translUnitP preproc $ posOfNode ni)
diff --git a/code/src/aesop/parser/CParse.lhs b/code/src/aesop/parser/CParse.lhs
index 4721961..0476de8 100644
--- a/code/src/aesop/parser/CParse.lhs
+++ b/code/src/aesop/parser/CParse.lhs
@@ -32,6 +32,12 @@ _123_34_
> getPosVarStr :: NodeInfo -> String
> getPosVarStr (NodeInfo p _ _) = "_" ++ (show $ posRow p) ++ "_" ++ (show $ posColumn p) ++ "_"
+This is useful for removing the names (and initializers) from a declaration, making it
+a declaration without a name (good for return types, etc.).
+
+> emptyDeclrList :: CDecl -> CDecl
+> emptyDeclrList (CDecl specifiers _ ni) = CDecl specifiers [] ni
+
Get the declarators from a list of triples
> getCDeclrsFromList :: [(Maybe CDeclr, Maybe CInit, Maybe CExpr)] -> [CDeclr]
diff --git a/code/src/aesop/parser/Serialize.hs b/code/src/aesop/parser/Serialize.hs
index 1b6d075..4b774dc 100644
--- a/code/src/aesop/parser/Serialize.hs
+++ b/code/src/aesop/parser/Serialize.hs
@@ -64,7 +64,7 @@ instance Serialize CFunDef where
$+$ hsep (map pretty declspecs) -- __attribute__((noreturn)) static long
<+> pretty declr -- foo(b)
$+$ (ii . vcat . map (<> semi) . map pretty) decls -- register long b;
- $$ serializePrec (-1) stat -- { ...
+ $+$ serializePrec (-1) stat -- { ...
-- }
instance Serialize CStat where
@@ -81,13 +81,13 @@ instance Serialize CStat where
szLine ni $+$
(ii $ text "if" <+> text "(" <> pretty expr <> text ")")
$+$ serializePrec (-1) stat
- $$ maybeP szElse estat
+ $+$ maybeP szElse estat
where
szElse (CIf else_if_expr else_if_stat else_stat ni) =
szLine ni $+$
text "else if" <+> text "(" <> pretty else_if_expr <> text ")"
$+$ serializePrec (-1) else_if_stat
- $$ maybeP szElse else_stat
+ $+$ maybeP szElse else_stat
szElse else_stmt =
text "else" $+$ serializePrec (-1) else_stmt
@@ -102,7 +102,7 @@ instance Serialize CStat where
serialize (CWhile expr stat True ni) =
szLine ni $+$
(ii $ text "do" $+$ serializePrec (-1) stat
- $$ text "while" <+> text "(" <> pretty expr <> text ");")
+ $+$ text "while" <+> text "(" <> pretty expr <> text ");")
serialize (CFor for_init cond step stat ni) =
szLine ni $+$
(ii $ text "for" <+> text "("
@@ -122,7 +122,7 @@ instance Serialize CStat where
serialize (CPBranch stmt ni) = szLine ni $+$ (ii $ text "pbranch" $+$ prettyPrec (-1) stmt)
serialize (CPBreak ni) = szLine ni $+$ (ii $ text "pbreak" <> semi)
serializePrec p (CCompound localLabels bis ni) =
- let inner = szLine ni $+$ text "{" $+$ mlistP ppLblDecls localLabels $+$ vcat (map serialize bis) $$ text "}"
+ let inner = text "{" $+$ mlistP ppLblDecls localLabels $+$ vcat (map serialize bis) $+$ text "}"
in if p == -1 then inner else ii inner
where ppLblDecls = vcat . map (\l -> text "__label__" <+> identP l <+> semi)
serializePrec _ p = serialize p
diff --git a/code/src/aesop/parser/ae-blocking-parser.lhs b/code/src/aesop/parser/ae-blocking-parser.lhs
index 8ac4aa1..f9f9c1d 100644
--- a/code/src/aesop/parser/ae-blocking-parser.lhs
+++ b/code/src/aesop/parser/ae-blocking-parser.lhs
@@ -753,7 +753,7 @@ to calling the appropriate callback
> return $ map ((trLocals p b) . (transformExits (mkCompoundStmt Nothing endStmts (getNI b)))) stmts
> swapReturnWithCallback :: CStat -> CStat -> CStat
-> swapReturnWithCallback endStmt (CReturn retexpr ni) = assert (isJust retexpr) compoundStmt
+> swapReturnWithCallback endStmt (CReturn retexpr ni) = compoundStmt
> where retparam = if isNothing retexpr then [] else [fromJust retexpr]
> compoundStmt = mkCompoundStmt Nothing (endStmt :
> [CExpr (Just (CCall (CMember (mkVar "ctl" ni)
@@ -769,7 +769,7 @@ to calling the appropriate callback
> everywhere (mkT $ swapReturnWithCallback endStmt) stmt
> swapPostReturnWithCallback :: CStat -> CStat -> CStat
-> swapPostReturnWithCallback endStmt (CReturn retexpr ni) = assert (isJust retexpr) compoundStmt
+> swapPostReturnWithCallback endStmt (CReturn retexpr ni) = compoundStmt
> where retparam = if isNothing retexpr then [] else [fromJust retexpr]
> compoundStmt = mkCompoundStmt Nothing (endStmt :
> [(CExpr (Just (CCall (CMember (mkVar "ctl" ni)
diff --git a/code/src/aesop/parser/ae-remote-parser.lhs b/code/src/aesop/parser/ae-remote-parser.lhs
index 4ef60c7..0b98ae3 100644
--- a/code/src/aesop/parser/ae-remote-parser.lhs
+++ b/code/src/aesop/parser/ae-remote-parser.lhs
@@ -648,25 +648,6 @@ CTypeOfType CDecl NodeInfo
> ((genCDecl "triton_node_t" "id" ni) : params) -- parameters
> stubStmts
-> mkServiceBlock :: String -> String -> String -> Bool -> String -> String -> NodeInfo -> RemoteT [CStat]
-> mkServiceBlock fname inTypeName inName isInPtr outTypeName outName ni = do
-> let macro = if isInPtr then "AER_MK_SERVICE_PTR_BLOCK" else "AER_MK_SERVICE_BLOCK"
-> mkStmtFromRemote macro [fname, inTypeName, inName, outTypeName, outName] ni
-
-> mkServiceStmts :: String -> [CDecl] -> NodeInfo -> RemoteT CStat
-> mkServiceStmts fname params ni = do
-> let [inparam, outparam] = params
-> (Ident inParamName _ _) = getCDeclName inparam
-> (Ident outParamName _ _) = getCDeclName outparam
-> inTypeName = canonCDecl (removeAPtr inparam)
-> outTypeName = canonCDecl (removeAPtr outparam)
-> (CDecl _ inDerived _) = inparam
-> isInPtr = any isDerivedPtr (join $ map getDerivedDeclrs inDerived)
-> serviceBlock <- mkServiceBlock fname inTypeName inParamName isInPtr outTypeName outParamName ni
-
-> return $ mkCompoundWithDecls Nothing [inparam, (removeAPtr outparam), genCDecl "triton_ret_t" "ret" ni]
-> serviceBlock ni
-
> mkServiceFun :: CFunDef -> RemoteT CExtDecl
> mkServiceFun fundef = do
> let fname = getFunDefName fundef
@@ -676,12 +657,23 @@ CTypeOfType CDecl NodeInfo
> newspecs = filterOutTypeSpec $ noremote
> (Ident inParamName _ _) = getCDeclName inparam
> (Ident outParamName _ _) = getCDeclName outparam
-> inTypeName = canonCDecl (removeAPtr inparam)
-> outTypeName = canonCDecl (removeAPtr outparam)
+> inTypeName = show $ pretty (removeAPtr $ emptyDeclrList inparam)
+> outTypeName = show $ pretty (removeAPtr $ emptyDeclrList outparam)
+> canonInType = getRemoteTypeName $ getTypeSpecFromDecl inparam
+> canonOutType = getRemoteTypeName $ getTypeSpecFromDecl outparam
> (CDecl _ inDerived _) = inparam
> isInPtr = any isDerivedPtr (join $ map getDerivedDeclrs inDerived)
> macro = if isInPtr then "AER_MK_SERVICE_FNDEF_INPTR" else "AER_MK_SERVICE_FNDEF"
-> [fdef] <- mkFunDefFromRemote (fname ++ "_service_block") [] macro [fname, inTypeName, inParamName, outTypeName, outParamName] ni
+> assert (isJust canonInType) return ()
+> assert (isJust canonOutType) return ()
+> [fdef] <- mkFunDefFromRemote (fname ++ "_service_block") [] macro
+> [fname,
+> inTypeName,
+> fromJust canonInType,
+> inParamName,
+> outTypeName,
+> fromJust canonOutType,
+> outParamName] ni
> return $ addDeclSpecs fdef newspecs
> mkOpStmts :: String -> NodeInfo -> RemoteT [CStat]
@@ -698,6 +690,11 @@ CTypeOfType CDecl NodeInfo
> []
> (mkCompoundStmt Nothing (opfunStmts) ni)
+> mkRegCtorFun :: String -> NodeInfo -> RemoteT CExtDecl
+> mkRegCtorFun serviceName ni = do
+> [fdef] <- mkFunDefFromRemote "" [] "AER_MK_REG_CTOR_FNDEF" [serviceName] ni
+> return fdef
+
> transformRemote :: CExtDecl -> RemoteT [CExtDecl]
> transformRemote e@(CFDefExt funDef)
> | isRemoteFunDef funDef = do
@@ -768,7 +765,8 @@ CTypeOfType CDecl NodeInfo
> opidDecls <- mkOpIdDecls ni
> sDecls <- mkServiceDecls ni
> regf <- mkRegFun sname ni
-> return $ CTranslUnit (opidDecls ++ sDecls ++ [regf]) ni
+> ctor <- mkRegCtorFun sname ni
+> return $ CTranslUnit (opidDecls ++ sDecls ++ [regf, ctor]) ni
> generateAST :: FilePath -> IO CTranslUnit
> generateAST input_file = do
@@ -779,8 +777,10 @@ CTypeOfType CDecl NodeInfo
> Right ast -> return ast
> getRegistryDecl :: String -> NodeInfo -> CTranslUnit
-> getRegistryDecl s ni = CTranslUnit [ CDeclExt $ (mkFunDecl ("aer_remote_register_" ++ s) (CTypeDef (newIdent "triton_ret_t" ni) ni) []
-> [mkAnonCDecl (CVoidType ni) [] ni]) ] ni
+> getRegistryDecl s ni = CTranslUnit [
+> CDeclExt $ (mkFunDecl ("aer_remote_register_" ++ s)
+> (CTypeDef (newIdent "triton_ret_t" ni) ni) []
+> [mkAnonCDecl (CVoidType ni) [] ni]) ] ni
> writeRegistryFiles :: String -> Maybe String -> RemoteT ()
> writeRegistryFiles s r = do
@@ -801,7 +801,7 @@ CTypeOfType CDecl NodeInfo
> \#ifndef ___" ++ s ++ "_h__ \n\
> \#define ___" ++ s ++ "_h__ \n\
> \#include \"src/aesop/aesop.h\" \n\
-> \#include \"src/remote/service.h\" \n\
+> \#include \"src/remote/service.hae\" \n\
> \\n\n"
> liftIO $ ((appendFile headerfile) . show . pretty) (getRegistryDecl s ni)
> liftIO $ appendFile headerfile $ " \n\
diff --git a/code/src/aesop/parser/tests/remote/test-remote.aer b/code/src/aesop/parser/tests/remote/test-remote.aer
index 93e0e1d..b1b6ff1 100644
--- a/code/src/aesop/parser/tests/remote/test-remote.aer
+++ b/code/src/aesop/parser/tests/remote/test-remote.aer
@@ -10,9 +10,9 @@ __remote struct myremotes
uint64_t ut1;
};
-__remote __blocking triton_ret_t myremote(int32_t in, int32_t *out);
+__remote __blocking triton_ret_t remotefun1(int32_t in, int32_t *out);
-__remote __blocking triton_ret_t myremote(int32_t in, int32_t *out)
+__remote __blocking triton_ret_t remotefun1(int32_t in, int32_t *out)
{
triton_ret_t ret;
*out = triton_timer(in);
@@ -20,6 +20,17 @@ __remote __blocking triton_ret_t myremote(int32_t in, int32_t *out)
return TRITON_SUCCESS;
}
+__remote __blocking triton_ret_t remotefun2(struct myremotes *in, struct myremotes *out);
+
+__remote __blocking triton_ret_t remotefun2(struct myremotes *in, struct myremotes *out)
+{
+ triton_ret_t ret;
+ out->t1 = triton_timer(in->t1);
+ out->ut1 = 100;
+ return TRITON_SUCCESS;
+}
+
+
/*
* Local variables:
* c-indent-level: 4
diff --git a/code/src/common/resources/scheduling/test/coalesce.ae b/code/src/common/resources/scheduling/test/coalesce.ae
index 7c8013b..e9b8207 100644
--- a/code/src/common/resources/scheduling/test/coalesce.ae
+++ b/code/src/common/resources/scheduling/test/coalesce.ae
@@ -4,7 +4,7 @@
static triton_sched_action_t coalesce_trigger(struct triton_sched *sched, triton_sched_trigger_event_t op)
{
- if(ae_ops_size(&sched->opqueue) >= 8)
+ if(ae_ops_count(&sched->opqueue) >= 8)
{
return TRITON_SCHED_ACTION_NOTIFY_ALL;
}
diff --git a/code/src/common/triton-buffer.h b/code/src/common/triton-buffer.h
index 4b7b23b..b1156c9 100644
--- a/code/src/common/triton-buffer.h
+++ b/code/src/common/triton-buffer.h
@@ -19,7 +19,7 @@
typedef struct
{
char *buffer;
- uint64_t size;
+ uint32_t size;
char *cptr;
triton_list_t encoded; /* other buffers from encoding */
@@ -35,7 +35,7 @@ static inline void triton_buffer_ptr_reset(triton_buffer_t *buffer)
buffer->cptr = buffer->buffer;
}
-inline static triton_ret_t triton_buffer_alloc(triton_buffer_t *buffer, int64_t size)
+static inline triton_ret_t triton_buffer_alloc(triton_buffer_t *buffer, int64_t size)
{
assert(buffer);
buffer->buffer = malloc(size);
@@ -56,6 +56,11 @@ static inline void triton_buffer_free(triton_buffer_t *buffer)
buffer->size = 0;
}
+static inline void triton_buffer_fix_size(triton_buffer_t *buffer)
+{
+ buffer->size = (buffer->cptr - buffer->buffer);
+}
+
/* The buffer_check_overflow macro verfies that the current buffer pointer is not
* at the end of the buffer, and that there's enough space left for __inc bytes.
*/
diff --git a/code/src/common/triton-log.h b/code/src/common/triton-log.h
index 056c1f9..80d8ec7 100644
--- a/code/src/common/triton-log.h
+++ b/code/src/common/triton-log.h
@@ -64,13 +64,13 @@ void triton_log_set_level(triton_log_t log, enum triton_log_level level);
triton_ret_t triton_log(
triton_log_t log, enum triton_log_level level, const char *message, ...);
-#define triton_info(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_INFO, __message, __VA_ARTRITON__)
-#define triton_notice(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_NOTICE, __message, __VA_ARTRITON__)
-#define triton_warn(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_WARN, __message, __VA_ARTRITON__)
-#define triton_err(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_ERR, __message, __VA_ARTRITON__)
-#define triton_crit(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_CRIT, __message, __VA_ARTRITON__)
-#define triton_alert(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_ALERT, __message, __VA_ARTRITON__)
-#define triton_emerg(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_EMERG, __message, __VA_ARTRITON__)
+#define triton_info(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_INFO, __message, __VA_ARGS__)
+#define triton_notice(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_NOTICE, __message, __VA_ARGS__)
+#define triton_warn(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_WARN, __message, __VA_ARGS__)
+#define triton_err(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_ERR, __message, __VA_ARGS__)
+#define triton_crit(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_CRIT, __message, __VA_ARGS__)
+#define triton_alert(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_ALERT, __message, __VA_ARGS__)
+#define triton_emerg(__log, __message, ...) triton_log(__log, TRITON_LOG_LEVEL_EMERG, __message, __VA_ARGS__)
/**
* Takes the triton_ret_t error, and writes a message to the log
diff --git a/code/src/net/triton-message.hae b/code/src/net/triton-message.hae
index ef98fe7..d4c811f 100644
--- a/code/src/net/triton-message.hae
+++ b/code/src/net/triton-message.hae
@@ -18,8 +18,8 @@ void triton_msg_finalize(void);
*
* Allow for unexpected messages to be received via group_recv.
*
- * group_add(ctx, "aesop.remote.unexpected", &group_aesop_remote_unexp);
- * group_add(ctx, "aesop.remote.expexted", &group_aesop_remote_exp);
+ * group_add(ctx, "aesop.remote.unexpected", &ae_remote_unexp_group);
+ * group_add(ctx, "aesop.remote.expexted", &ae_remote_exp_group);
*/
triton_ret_t triton_msg_group_add(triton_msg_ctx_t ctx, const char *service_name, triton_msg_group_t *group);
diff --git a/code/src/remote/encoding-pw.h b/code/src/remote/encoding-pw.h
index bcdb365..ebd04bd 100644
--- a/code/src/remote/encoding-pw.h
+++ b/code/src/remote/encoding-pw.h
@@ -442,7 +442,7 @@ static inline triton_ret_t aer_decode_triton_buffer_t(
triton_buffer_t *buffer, char **n __unused, void *x)
{
triton_ret_t ret;
- uint64_t size;
+ uint64_t size = 0;
assert(buffer);
assert(x);
diff --git a/code/src/remote/message.ae b/code/src/remote/message.ae
index 5ef1807..1fdbba9 100644
--- a/code/src/remote/message.ae
+++ b/code/src/remote/message.ae
@@ -1,9 +1,106 @@
#include "src/remote/message.hae"
+#include "src/common/triton-buffer.h"
+
+extern triton_msg_group_t ae_remote_unexp_group;
+extern triton_msg_group_t ae_remote_exp_group;
+
+static triton_mutex_t aer_msg_tag_mutex = TRITON_MUTEX_INITIALIZER;
+static uint32_t aer_msg_tag_current = 0;
+
+static uint32_t aer_next_tag(void)
+{
+ uint32_t val;
+ triton_mutex_lock(&aer_msg_tag_mutex);
+ val = ++aer_msg_tag_current;
+ triton_mutex_unlock(&aer_msg_tag_mutex);
+ return val;
+}
triton_ret_t aer_message_init(aer_message_t *m, uint64_t size, uint64_t op)
{
+ triton_ret_t ret;
+
+ ret = triton_buffer_alloc(&m->buffer, size);
+ if(ret != TRITON_SUCCESS) return ret;
+
+ m->header.op = op;
+ m->header.version = AESOP_REMOTE_PROTOCOL_VERSION;
- triton_buffer_alloc(&m->buffer, size);
return TRITON_SUCCESS;
}
+
+void aer_message_destroy(aer_message_t *m)
+{
+ triton_buffer_free(&m->buffer);
+ free(m);
+}
+
+uint64_t aer_message_get_op(aer_message_t *m)
+{
+ return m->header.op;
+}
+
+__blocking triton_ret_t aer_message_send(triton_node_t dest, aer_message_t *msg)
+{
+ /* TODO: timeout/retry.. */
+ return triton_msg_send(TRITON_MSG_CTX_DEFAULT,
+ dest,
+ ae_remote_exp_group,
+ ae_remote_next_tag(),
+ 1,
+ &msg->buffer.buffer,
+ &msg->buffer.size);
+}
+
+__blocking triton_ret_t aer_message_recv(triton_node_t from, aer_message_t *msg)
+{
+ /* TODO: timeout/retry.. */
+ return triton_msg_recv(TRITON_MSG_CTX_DEFAULT,
+ from,
+ ae_remote_exp_group,
+ msg->header.tag,
+ 1,
+ &msg->buffer.buffer,
+ &msg->buffer.size,
+ &msg->buffer.size);
+}
+
+__blocking triton_ret_t aer_message_sendrecv(triton_node_t dest,
+ aer_message_t *send,
+ aer_message_t *recv)
+{
+ triton_msg_tag_t tag = ae_remote_next_tag();
+ triton_ret_t recv_ret, send_ret;
+
+ /* TODO: timeout/retry.. */
+ pwait
+ {
+ pbranch
+ {
+ recv_ret = triton_msg_recv(TRITON_MSG_CTX_DEFAULT,
+ dest,
+ ae_remote_exp_group,
+ tag,
+ 1,
+ &recv->buffer.buffer,
+ &recv->buffer.size,
+ &recv->buffer.size);
+ }
+
+ pbranch
+ {
+ send_ret = triton_msg_send(TRITON_MSG_CTX_DEFAULT,
+ dest,
+ ae_remote_unexp_group,
+ tag,
+ 1,
+ &send->buffer.buffer,
+ &send->buffer.size);
+ }
+ }
+
+ if(send_ret != TRITON_SUCCESS) return send_ret;
+
+ return recv_ret;
+}
diff --git a/code/src/remote/message.hae b/code/src/remote/message.hae
index d636658..002fdca 100644
--- a/code/src/remote/message.hae
+++ b/code/src/remote/message.hae
@@ -4,11 +4,15 @@
#include "src/aesop/aesop.h"
#include "src/remote/encoding.h"
#include "src/common/triton-buffer.h"
+#include "src/net/triton-message.hae"
+
+#define AESOP_REMOTE_PROTOCOL_VERSION 1
struct aer_message_header
{
uint64_t version;
uint64_t op;
+ triton_msg_tag_t tag;
};
typedef struct
diff --git a/code/src/remote/service.ae b/code/src/remote/service.ae
index 6aff6b2..e8c5694 100644
--- a/code/src/remote/service.ae
+++ b/code/src/remote/service.ae
@@ -36,14 +36,36 @@ static int service_id_equal(void *k, struct triton_hash_link *l)
return (s->service_id == *id);
}
+__attribute__((constructor)) void aer_service_static_initializer(void)
+{
+ triton_ret_t ret;
+ ret = aer_service_init();
+ assert(ret == TRITON_SUCCESS);
+}
+
+triton_msg_group_t ae_remote_unexp_group;
+triton_msg_group_t ae_remote_exp_group;
+
/* 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.
*/
-void aer_service_init(void)
+triton_ret_t aer_service_init(void)
{
- service_table = triton_hash_init(service_id_equal, triton_hash_64bit_hash, 8192);
- assert(service_table != NULL);
+ triton_ret_t ret;
+ if(service_table == NULL)
+ {
+ service_table = triton_hash_init(service_id_equal, triton_hash_64bit_hash, 8192);
+ if(service_table == NULL) return TRITON_ERR_NOMEM;
+ }
+
+ ret = triton_msg_group_add(
+ TRITON_MSG_CTX_DEFAULT, "aesop.remote.unexpected", &ae_remote_unexp_group);
+ if(ret != TRITON_SUCCESS) return ret;
+
+ ret = triton_msg_group_add(
+ TRITON_MSG_CTX_DEFAULT, "aesop.remote.expected", &ae_remote_exp_group);
+ return ret;
}
static void free_aer_service(void *x)
@@ -55,6 +77,7 @@ static void free_aer_service(void *x)
void aer_service_finalize(void)
{
+ assert(service_table != NULL);
triton_hash_destroy_and_finalize(service_table, struct aer_service, link, free_aer_service);
return;
}
@@ -63,8 +86,12 @@ triton_ret_t aer_service_register(uint64_t service_id,
const char *service,
__blocking triton_ret_t (*service_fn)(aer_message_t *in, aer_message_t *out))
{
+ triton_ret_t ret;
struct aer_service *s;
+ ret = aer_service_init();
+ assert(ret == TRITON_SUCCESS);
+
s = malloc(sizeof(*s));
if(!s) return TRITON_ERR_NOMEM;
@@ -81,6 +108,8 @@ __blocking triton_ret_t aer_service_invoke(uint64_t service_id, aer_message_t *i
struct triton_hash_link *s;
struct aer_service *service;
+ assert(service_table != NULL);
+
s = triton_hash_search(service_table, (void *)&service_id);
if(s == NULL)
{
diff --git a/code/src/remote/service.hae b/code/src/remote/service.hae
index 2c48150..d36de0f 100644
--- a/code/src/remote/service.hae
+++ b/code/src/remote/service.hae
@@ -2,17 +2,17 @@
#define __SERVICE_H__
#include "src/common/triton-types.h"
-#include "src/remote/message.h"
+#include "src/remote/message.hae"
uint64_t aer_service_unique_id(const char *opname);
triton_ret_t aer_service_register(uint64_t service_id,
- const char *service,
- __blocking triton_ret_t (*service_fn)(aer_message_t *in, aer_message_t *out));
+ const char *service,
+ __blocking triton_ret_t (*service_fn)(aer_message_t *in, aer_message_t *out));
__blocking triton_ret_t aer_service_invoke(uint64_t service_id, aer_message_t *in, aer_message_t *out);
-void aer_service_init(void);
+triton_ret_t aer_service_init(void);
void aer_service_finalize(void);
diff --git a/code/triton-config.h.in b/code/triton-config.h.in
index 395661c..8ee812f 100644
--- a/code/triton-config.h.in
+++ b/code/triton-config.h.in
@@ -1,13 +1,4 @@
-/* gs-config.h.in. Generated from configure.ac by autoheader. */
-
-/* major version number */
-#undef TRITON_VERSION_MAJOR
-
-/* minor version number */
-#undef TRITON_VERSION_MINOR
-
-/* sub version number */
-#undef TRITON_VERSION_SUB
+/* triton-config.h.in. Generated from configure.ac by autoheader. */
/* Define if third param (message) to DB error callback function is const */
#undef HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK
@@ -37,7 +28,7 @@
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINTRITON_H
+#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
@@ -84,6 +75,15 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* major version number */
+#undef TRITON_VERSION_MAJOR
+
+/* minor version number */
+#undef TRITON_VERSION_MINOR
+
+/* sub version number */
+#undef TRITON_VERSION_SUB
+
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
hooks/post-receive
--
Triton Repository
6020
Age (days ago)
6020
Last active (days ago)
0 comments
1 participants
participants (1)
-
noreply@mcs.anl.gov