浏览代码

src/common/starpu_spinlock.h: field last_taker must always be defined when STARPU_SPINLOCK_CHECK is defined

Nathalie Furmento 12 年之前
父节点
当前提交
7e1382bdb7
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/common/starpu_spinlock.h

+ 3 - 1
src/common/starpu_spinlock.h

@@ -30,13 +30,15 @@ struct _starpu_spinlock
 #elif defined(STARPU_SPINLOCK_CHECK)
 	pthread_mutexattr_t errcheck_attr;
 	_starpu_pthread_mutex_t errcheck_lock;
-	const char *last_taker;
 #elif defined(HAVE_PTHREAD_SPIN_LOCK)
 	_starpu_pthread_spinlock_t lock;
 #else
 	/* we only have a trivial implementation yet ! */
 	uint32_t taken __attribute__ ((aligned(16)));
 #endif
+#ifdef STARPU_SPINLOCK_CHECK
+	const char *last_taker;
+#endif
 };
 
 int _starpu_spin_init(struct _starpu_spinlock *lock);