[m-rev.] diff: Fix the recently broken hlc.par grades.

Paul Bone pbone at csse.unimelb.edu.au
Tue Dec 1 10:25:55 AEDT 2009


Fix the recently broken hlc.par grades, remove a compiler warning and
superfluous characters in a comment.

runtime/mercury_stm.h:
    Conform to recent changes in the MR_cond_*() macros.

runtime/mercury_wrapper.c:
    Conform to recent changes in the MR_cond_*() macros.
    Use the correct integer length modifier on both 32 and 64bit systems.  This
    corrects a compiler warning.

runtime/mercury_stm.c:
    Remove superfluous '**' string from a code comment. 

Index: runtime/mercury_stm.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stm.c,v
retrieving revision 1.9
diff -u -p -b -r1.9 mercury_stm.c
--- runtime/mercury_stm.c	30 Oct 2009 04:56:41 -0000	1.9
+++ runtime/mercury_stm.c	30 Nov 2009 21:50:53 -0000
@@ -391,7 +391,7 @@ MR_STM_block_thread(MR_STM_TransLog *tlo
 ** In the low level C grades, the "condition variable" created when an STM
 ** transaction blocks is actually a pointer to the transaction log.
 ** "Signalling" it consists of going through the STM variables listed in the
-** log and removing ** the waiters attached to them for the context listed
+** log and removing the waiters attached to them for the context listed
 ** in the log. After this, the context can be safely rescheduled.
 */
 void
Index: runtime/mercury_stm.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_stm.h,v
retrieving revision 1.8
diff -u -p -b -r1.8 mercury_stm.h
--- runtime/mercury_stm.h	5 May 2009 05:37:37 -0000	1.8
+++ runtime/mercury_stm.h	30 Nov 2009 21:51:39 -0000
@@ -77,8 +77,8 @@ typedef struct MR_STM_TransLog_Struct   
         typedef MercuryCond  MR_STM_ConditionVar;
 
         #define MR_STM_condvar_init(x)        pthread_cond_init(x, MR_COND_ATTR)
-        #define MR_STM_condvar_wait(x, y)     MR_cond_wait(x, y)
-        #define MR_STM_condvar_signal(x)      MR_cond_signal(x)
+        #define MR_STM_condvar_wait(x, y)     MR_cond_wait(x, y, "STM_condvar_wait")
+        #define MR_STM_condvar_signal(x)      MR_cond_signal(x, "STM_condvar_signal")
     #else
         typedef MR_Integer      MR_STM_ConditionVar;
         /*
Index: runtime/mercury_wrapper.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_wrapper.c,v
retrieving revision 1.201
diff -u -p -b -r1.201 mercury_wrapper.c
--- runtime/mercury_wrapper.c	5 Nov 2009 05:47:40 -0000	1.201
+++ runtime/mercury_wrapper.c	30 Nov 2009 21:55:17 -0000
@@ -2156,7 +2156,8 @@ MR_process_options(int argc, char **argv
 
             case 'P':
 #ifdef  MR_THREAD_SAFE
-                if (sscanf(MR_optarg, "%u", &MR_num_threads) != 1) {
+                if (sscanf(MR_optarg, "%"MR_INTEGER_LENGTH_MODIFIER"u",
+                        &MR_num_threads) != 1) {
                     MR_usage();
                 }
 
@@ -2662,7 +2663,8 @@ MR_do_interpreter(void)
     assert(pthread_self() == MR_primordial_thread);
     MR_LOCK(&MR_thread_barrier_lock, "MR_do_interpreter");
     while (MR_thread_barrier_count > 0) {
-        while (MR_WAIT(&MR_thread_barrier_cond, &MR_thread_barrier_lock) != 0)
+        while (MR_WAIT(&MR_thread_barrier_cond, &MR_thread_barrier_lock,
+                "MR_do_interpreter") != 0)
             ;
     }
     MR_UNLOCK(&MR_thread_barrier_lock, "MR_do_interpreter");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20091201/e170c1ed/attachment.sig>


More information about the reviews mailing list