[m-rev.] diff: add missing #ifdef MR_HAVE_SCHED_SETAFFINITY

Peter Ross pro at missioncriticalit.com
Mon Jan 11 14:59:40 AEDT 2010


Hi,

cygwin doesn't have MR_HAVE_SCHED_SETAFFINITY but it does define
MR_LL_PARALLEL_CONJ in the asm_fast.gc.par grade so mercury_context.c
doesn't compile.

===================================================================


Estimated hours taken: 0.25
Branches: main

runtime/mercury_context.c:
	MR_next_cpu_lock is only defined if MR_LL_PARALLEL_CONJ and
	MR_HAVE_SCHED_SETAFFINITY are defined, so wrap the initialization
	of MR_next_cpu_lock with the missing #ifdef MR_HAVE_SCHED_SETAFFINITY.


Index: runtime/mercury_context.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_context.c,v
retrieving revision 1.75
diff -u -r1.75 mercury_context.c
--- runtime/mercury_context.c	10 Jan 2010 04:53:39 -0000	1.75
+++ runtime/mercury_context.c	11 Jan 2010 03:52:30 -0000
@@ -183,7 +183,9 @@
     pthread_mutex_init(&MR_pending_contexts_lock, MR_MUTEX_ATTR);
   #ifdef MR_LL_PARALLEL_CONJ
     pthread_mutex_init(&spark_deques_lock, MR_MUTEX_ATTR);
+    #ifdef MR_HAVE_SCHED_SETAFFINITY
     pthread_mutex_init(&MR_next_cpu_lock, MR_MUTEX_ATTR);
+    #endif
     #ifdef MR_DEBUG_RUNTIME_GRANULARITY_CONTROL
     pthread_mutex_init(&MR_par_cond_stats_lock, MR_MUTEX_ATTR);
     #endif
--------------------------------------------------------------------------
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