 		}
 		result_available = false;
 
+		lock_thread_id = -1;
 		return result_int;
 	}
 


				pthread_mutex_t *lock =
						(pthread_mutex_t *) &_this->mutex_process_command;
				int result = pthread_mutex_trylock(lock);
				printf(
						"KernelWrapper thread: %p, trylock(mutex_process_command): %d mutex: %p\n",
						pthread_self(), result, lock);

				if (result != 0) {
					pthread_mutex_lock(lock);
				}
				_this->processCommand();
				_this->reset();
				pthread_mutex_unlock(lock);
				printf(
						"KernelWrapper thread: %p, UNLOCKED(mutex_process_command)\n",
						pthread_self());

			}
		}
		return NULL;

			}
		}
		result_available = false;

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

		lock_thread_id = -1;
		//__threadfence_system();
		__threadfence();
		return result_int;
	}

