[m-dev.] diff: fix bug with nondet fact tables and --parallel
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Aug 25 16:06:06 AEST 2000
This diff fixes a bug which caused the nightly tests on hg in
grade asm_fast.gc.par to hang.
----------
Estimated hours taken: 1
compiler/make_hlds.m:
When generating `pragma c_code' for fact table procedures, use
the `thread_safe' option. This is needed for nondet fact table
procedures in `.par' grades, since the hack that we currently
use for nondet fact table procedures results in the code acquiring
the global lock but never releasing it (and thus eventually
deadlocking). It's also beneficial for all fact table procedures,
since it avoids some unnecessary locking code.
Workspace: /home/pgrad/fjh/ws/hg
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.342
diff -u -d -r1.342 make_hlds.m
--- compiler/make_hlds.m 2000/08/16 08:54:00 1.342
+++ compiler/make_hlds.m 2000/08/25 05:36:25
@@ -7680,7 +7680,8 @@
% XXX this should be modified to use nondet pragma c_code.
{ default_attributes(Attrs0) },
- { set_may_call_mercury(Attrs0, will_not_call_mercury, Attrs) },
+ { set_may_call_mercury(Attrs0, will_not_call_mercury, Attrs1) },
+ { set_thread_safe(Attrs1, thread_safe, Attrs) },
module_add_pragma_c_code(Attrs, SymName, PredOrFunc,
PragmaVars, VarSet, ordinary(C_ProcCode, no),
Status, Context, Module0, Module1, Info0, Info),
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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