Hi this is the multithread program I\'m trying to write but it gives me segfault the original code works fine without multi-thread but this gives me segfaults I used