/*
 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/*
 * gc_noinst.c : Functions that shouldn't be instrumented by the compiler
 */

__thread unsigned int thread_suspend_if_needed_count = 0;

/* TODO(elijahtaylor): This will need to be changed
 *  when the compiler instrumentation changes.
 */
volatile int __nacl_thread_suspension_needed = 1;

void __nacl_suspend_thread_if_needed() {
  thread_suspend_if_needed_count++;
}

/*
 * Copyright 2010 The Native Client Authors.  All rights reserved.
 * Use of this source code is governed by a BSD-style license that can
 * be found in the LICENSE file.
 */

/*
 * gc_noinst.c : Functions that shouldn't be instrumented by the compiler
 */

__thread unsigned int thread_suspend_if_needed_count = 0;

/* TODO(elijahtaylor): This will need to be changed
 *  when the compiler instrumentation changes.
 */
void __nacl_suspend_thread_if_needed() {
  thread_suspend_if_needed_count++;
}


--- 
+++ 
@@ -1,7 +1,7 @@
 /*
- * Copyright 2010 The Native Client Authors.  All rights reserved.
- * Use of this source code is governed by a BSD-style license that can
- * be found in the LICENSE file.
+ * Copyright (c) 2011 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
  */
 
 /*
@@ -13,7 +13,8 @@
 /* TODO(elijahtaylor): This will need to be changed
  *  when the compiler instrumentation changes.
  */
+volatile int __nacl_thread_suspension_needed = 1;
+
 void __nacl_suspend_thread_if_needed() {
   thread_suspend_if_needed_count++;
 }
-
Fix the gc_instrumentation test on toolchain bots.

The compiler now inserts explicit references to the suspension flag, which then
fails to link when the flag is not present.

BUG=none
TEST=run_gc_instrumentation_test # with freshly uploaded toolchain

Review URL: http://codereview.chromium.org/8336018

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@6962 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
