[m-rev.] trivial diff: fix linking problems on mingw

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Sep 4 00:14:02 AEST 2007


Estimated hours taken: 0.1
Branches: main

Fix linking problems with MinGW.

library/stm_builtin.m:
 	Delete some debugging predicates that cause linking the library to
 	fail on MinGW because the function sleep() is not available on that
 	system.  (We could use #ifdef MR_HAVE_SLEEP, but since they
 	were only debugging predicates ...).

Julien.

Index: stm_builtin.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/stm_builtin.m,v
retrieving revision 1.6
diff -u -r1.6 stm_builtin.m
--- stm_builtin.m	31 Aug 2007 09:00:44 -0000	1.6
+++ stm_builtin.m	3 Sep 2007 13:58:26 -0000
@@ -121,14 +121,6 @@
  :- impure pred stm_block_thread(stm::ui) is det.

  %-----------------------------------------------------------------------------%
-
-    % Debugging predicates.  XXX Only temp.
-    %
-:- pred very_unsafe_write_tvar(tvar(T)::in, T::in, stm::di, stm::uo) is det.
-:- pred stm_debug_sleep(int::in, stm::di, stm::uo) is det.
-:- pred stm_debug_sleep_IO(int::in, io::di, io::uo) is det.
-
-%-----------------------------------------------------------------------------%
  %-----------------------------------------------------------------------------%

  :- implementation.
@@ -520,38 +512,6 @@

  %-----------------------------------------------------------------------------%

-:- pragma foreign_proc("C",
-    very_unsafe_write_tvar(TVar::in, Val::in, STM0::di, STM::uo),
-    [will_not_call_mercury, thread_safe, promise_pure],
-"
-    ML_TRACE_STM(""WARNING: very_unsafe_write_tvar predicate called"");
-
-    TVar->tvar_val = Val;
-    STM = STM0;
-").
-
-%:- pred stm_debug_sleep(int::in, stm::di, stm::uo) is det.
-:- pragma foreign_proc("C",
-    stm_debug_sleep(Amt::in, STM0::di, STM::uo),
-    [will_not_call_mercury, thread_safe, promise_pure],
-"
-    ML_TRACE_STM(""Putting thread to sleep"");
-    sleep(Amt);
-
-    STM = STM0;
-").
-
-%:- pred stm_debug_sleep_IO(int::in, io::di, io::uo) is det.
-:- pragma foreign_proc("C",
-    stm_debug_sleep_IO(Amt::in, IO0::di, IO::uo),
-    [will_not_call_mercury, thread_safe, promise_pure],
-"
-    ML_TRACE_STM(""Putting thread to sleep"");
-    sleep(Amt);
-    IO = IO0;
-").
-%----------------------------------------------------------------------------%
-
  /* To Implement:
  **
  **  retry(STM) :-

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list