Parcourir la source

contexts: Move definition of `changing_ctx_mutex' out of header.

This fixes duplicate-definition errors:
http://hydra.bordeaux.inria.fr/build/137895 .
Ludovic Courtès il y a 12 ans
Parent
commit
73387de086
2 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 3 1
      src/core/sched_ctx.c
  2. 2 2
      src/core/sched_ctx.h

+ 3 - 1
src/core/sched_ctx.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011  INRIA
+ * Copyright (C) 2011, 2013  INRIA
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -18,6 +18,8 @@
 #include <core/sched_ctx.h>
 #include <common/utils.h>
 
+_starpu_pthread_mutex_t changing_ctx_mutex[STARPU_NMAX_SCHED_CTXS];
+
 extern struct starpu_sched_ctx_worker_collection worker_list;
 static _starpu_pthread_mutex_t sched_ctx_manag = _STARPU_PTHREAD_MUTEX_INITIALIZER;
 static _starpu_pthread_mutex_t finished_submit_mutex = _STARPU_PTHREAD_MUTEX_INITIALIZER;

+ 2 - 2
src/core/sched_ctx.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011  INRIA
+ * Copyright (C) 2011, 2013  INRIA
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -30,7 +30,7 @@
 
 
 /* used when changes (delete, modify) are applyed to contexts */
-_starpu_pthread_mutex_t changing_ctx_mutex[STARPU_NMAX_SCHED_CTXS];
+extern _starpu_pthread_mutex_t changing_ctx_mutex[];
 
 struct _starpu_sched_ctx
 {