title: Trying to create posix thread and get invalid conversion from 'void*' to 'void* (__attribute__((__cdecl__)) *)(void*) error
body: <p>Sorry if I'm not as descriptive as I should be, I'm nearly asleep as I type this. I am trying to create a posix thread in my c++ code compiling with g++ on mingw. Here's the except of the code I'm trying to compile</p>
  
  <pre><code>static void processNextNodeOnQueue(queue&lt;TreeNode*&gt; &amp;toComputeQueue) {...}
  
  void static processNodes(void* ptr) {
      pair&lt;queue&lt;TreeNode*&gt;*, bool*&gt; *input = (pair&lt;queue&lt;TreeNode*&gt;*, bool*&gt;*) ptr;
      while(*(input-&gt;second)) {
          pthread_mutex_lock(&amp;mutex1);
          if(input-&gt;first-&gt;empty()) return;
          pthread_mutex_unlock(&amp;mutex1);
          processNextNodeOnQueue(*(input-&gt;first));
      }   
  }
  
  void startThinking() {
      thinking = true;
      mutex1 = PTHREAD_MUTEX_INITIALIZER;
      pthread_t thread;
      pair&lt;queue&lt;TreeNode*&gt;*, bool*&gt; *input = new pair&lt;queue&lt;TreeNode*&gt;*, bool*&gt;(&amp;toComputeQueue, &amp;thinking);
      int thereadId = pthread_create(&amp;thread, NULL, (void*)&amp;processNodes, (void*) input );
      delete input;
  }
  
  void stopThinking() {
      //set thinking to false and wait for threads to wrap up
      thinking = false;
  }
  
  void processForTime(double seconds) {
      clock_t t;
      int f;
      t = clock();
      startThinking();
      //something to wait for an amount of time
      stopThinking();
  }
  </code></pre>
  
  <p>Here's the full compiler output in case I missed something</p>
  
  <pre><code>C:\Users\Maxwell\SkyDrive\RPI\Fall 2013\IHSS-1964\Connect 4\MaxAI&gt;g++ -g -pthread -std=c++11 -o3 *.cpp -o Max.exe
  In file included from unit_tests.h:5:0,
                   from main.cpp:11:
  search_tree.h: In member function 'void BoardSearchTree::startThinking()':
  search_tree.h:221:85: error: invalid conversion from 'void*' to 'void* (__attribute__((__cdecl__)) *)(void*)' [-fpermissive]
     int thereadId = pthread_create(&amp;thread, NULL, (void*)&amp;processNodes, (void*) input );
                                                                                       ^
  In file included from search_tree.h:12:0,
                   from unit_tests.h:5,
                   from main.cpp:11:
  c:\mingw\include\pthread.h:940:31: error:   initializing argument 3 of 'int pthread_create(pthread_t*, pthread_attr_t_*const*, void* (__attribute__((__cdecl__)) *)(void*), void*)' [-fpermissive] PTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid,
  </code></pre>