 	// initialize cuPrintf
 	cudaPrintfInit();
 
-	device_method<<<1, 1>>>(d_kernelWrapper);
+	device_method<<<2, 1>>>(d_kernelWrapper);
 
 	// display the device's output
 	cudaPrintfDisplay();

__global__ void device_method(KernelWrapper *d_kernelWrapper) {

	int thread_id = threadIdx.x + blockIdx.x * blockDim.x;

	int old;
	int count = 0;

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

		if (old == -1 || old == thread_id) {
			//do critical section code


		is_monitoring = false;
		done = false;
		has_task = false;
		//pthread_mutex_init(&mutex_has_task, NULL);

		reset();
