Hi all.
I have a socket. I want to create two threads, one is to read from socket, and another is to write to socket. However, I want these two threads to be able to share the same data, so I created a mutex to lock the resource.
I don't know what happens with my two threads, but it always quits after it did some tasks.
Code:
#include "camel.h"
#include "irc.h" 

pthread_t         gtid;
...