 				printf(
 						"KernelWrapper wait for consuming result! result_int: %d, result_available: %s\n",
 						result_int, (result_available) ? "true" : "false");
-
 			}
 
 			printf("KernelWrapper consumed result: %d\n", result_int);

			}
		}
		result_available = false;
		cuPrintf("getValue lock_thread_id: %d result_available: %s\n",
				lock_thread_id, (result_available) ? "true" : "false");

		return result_int;
	}


	int count = 0;

	while (count < 100) {
		// (lock_thread_id == -1 ? thread_id : lock_thread_id)
		int old = atomicCAS((int *) &d_kernelWrapper->lock_thread_id, -1,
				thread_id);

