title: Simple question on threads and variable copying (with no need of syncing)
body: <p>If I want to pass a char* to various threads via pthread_create() and I want them to work independently what's the simplest way to do it safely?</p>
  
  <p>I notice I get unstable behavior if I do </p>
  
  <p>pseudo code:</p>
  
  <pre><code>func1() { // part of a loop
      Create var.. 
      func2(var); 
  }
  
  func2(char* var) { // spawn a thread
      pthread_create(.....,&amp;func3,(void*)var);
  }
  
  func3(void* var) {
      work with the var // unstable behavior
  } 
  </code></pre>
  
  <p>There's no need  for any data communication, the threads just get the var and then ignore what the rest of the program is doing. They just work on the var they got.</p>