[m-dev.] trivial diff: fixes for extras/aditi/aditi.m
Simon TAYLOR
stayl at cs.mu.OZ.AU
Tue Jun 27 15:40:37 AEST 2000
Estimated hours taken: 0.25
extras/aditi/aditi.m:
Change the definition of `aditi__state' so that is
not an equivalence type. This caused problems when
compiling with `--intermodule-optimization' because
the equivalence becomes visible in importing modules,
but parts of the compiler check for `aditi__state'
arguments after equivalence expansion.
Increase the timeouts for calls to database procedures.
Index: aditi.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/extras/aditi/aditi.m,v
retrieving revision 1.11
diff -u -u -r1.11 aditi.m
--- aditi.m 2000/05/26 14:40:56 1.11
+++ aditi.m 2000/06/27 05:12:04
@@ -186,7 +186,7 @@
:- import_module bool, char, exception, list, require, std_util, string.
:- type aditi__connection == int.
-:- type aditi__state == unit.
+:- type aditi__state ---> aditi__state.
% These are handled by the RL code generator.
:- external(aditi__aggregate_compute_initial/5).
@@ -204,6 +204,9 @@
#define MADITI_check(status) MADITI_do_check(status, __LINE__);
#define MADITI_throw MR_longjmp(&MADITI_jmp_buf);
+/* The timeout (in seconds) to use for a call to an Aditi procedure. */
+#define MADITI_CALL_TIMEOUT 600
+
typedef enum { MADITI_INSERT_TUPLE, MADITI_DELETE_TUPLE } MADITI_insert_delete;
typedef enum { MADITI_INSERT, MADITI_DELETE, MADITI_MODIFY } MADITI_bulk_op;
@@ -852,8 +855,8 @@
DEBUG(printf(""running procedure... ""));
/* XXX MR_GC_NEW_ATOMIC */
output_ticket = (ticket *) MR_GC_NEW(ticket);
- MADITI_check(ADITI_NAME(run2_s)(proc_name, 0, &MADITI_ticket,
- &input_ticket, output_ticket));
+ MADITI_check(ADITI_NAME(run2_s)(proc_name, MADITI_CALL_TIMEOUT,
+ &MADITI_ticket, &input_ticket, output_ticket));
DEBUG(printf(""done\\n""));
/*
@@ -1039,7 +1042,7 @@
DEBUG(printf(""Query finished -- calling update procedure %s\\n"",
update_proc_name));
MADITI_check(ADITI_NAME(run2_s)(update_proc_name,
- 0, &MADITI_ticket, call_result_ticket,
+ MADITI_CALL_TIMEOUT, &MADITI_ticket, call_result_ticket,
&dummy_output_ticket)
);
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list