[m-rev.] for review: Re-factor the MR_join_and_continue macro.
Zoltan Somogyi
zs at csse.unimelb.edu.au
Mon Nov 30 06:14:05 AEDT 2009
On 27-Nov-2009, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> This change passes bootcheck and the test suite in the asm_fast.gc.par grade.
library/thread.semaphore.m:
Fix bug that prevented the library from compiling in grade hlc.gc.
Zoltan.
cvs diff: Diffing .
Index: thread.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/thread.m,v
retrieving revision 1.16
diff -u -b -r1.16 thread.m
--- thread.m 5 Aug 2009 06:08:13 -0000 1.16
+++ thread.m 29 Nov 2009 19:08:29 -0000
@@ -372,7 +372,7 @@
MR_LOCK(&MR_thread_barrier_lock, ""ML_thread_wrapper"");
MR_thread_barrier_count--;
if (MR_thread_barrier_count == 0) {
- MR_SIGNAL(&MR_thread_barrier_cond);
+ MR_SIGNAL(&MR_thread_barrier_cond, ""ML_thread_wrapper"");
}
MR_UNLOCK(&MR_thread_barrier_lock, ""ML_thread_wrapper"");
Index: thread.semaphore.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/thread.semaphore.m,v
retrieving revision 1.17
diff -u -b -r1.17 thread.semaphore.m
--- thread.semaphore.m 5 Aug 2009 06:08:13 -0000 1.17
+++ thread.semaphore.m 29 Nov 2009 19:08:29 -0000
@@ -246,7 +246,7 @@
}
#else
sem->count++;
- MR_SIGNAL(&(sem->cond));
+ MR_SIGNAL(&(sem->cond), ""semaphore.signal"");
MR_UNLOCK(&(sem->lock), ""semaphore__signal"");
#endif
IO = IO0;
@@ -329,7 +329,8 @@
** return prematurely with the error code EINTR in glibc 2.3.2
** if the thread is sent a signal.
*/
- while (MR_WAIT(&(sem->cond), &(sem->lock)) != 0) {
+ while (MR_WAIT(&(sem->cond), &(sem->lock), ""semaphore.wait"") != 0) {
+ /* do nothing */
}
}
--------------------------------------------------------------------------
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