Turned threads to pointers. This permits to keep the same code whatever the OS is.

threads are long unsigned int under linux but a struct under windows,
so I had to find a common way to use them.