There are several processes and some threads in one process. All processes need to talk to each other. Threads in one process need to talk to the process(main threads). I am wondering if this design works:
Every process has a msg queue (using msgget(), msgsnd, msgrcv() ) so that they can talk to each other by linux API.
Every thread has a msg queue (also using msgget, msgsnd, msgrcv ) so that it can talk to the mainthread and other threads. So, this process in which threads are residing will have the process queue and threads' queue, Is there any problem?
I am worrying about the item 2 since what I learn is that msgget, msgsnd, msgrcv are for inter process communication. I read manual about these functions. It looks like no mentioning about if these functions are supporting threads. In addition, could you please refer me to some best online Linux/Unix manual? I am not good at it since I feel it hard to find what I am looking for like, if a function or semaphore can support thread/manual. Stupid question, :).
Please help. Thanks.