System V message queue support
- Each server have two treads, one for main command receiver, with msgrcv,
- Other thread will wait for admin commands on own queue
- when admin receives shutdown and it knows that main thread is waiting on Q (synced via global flags), it should set some globals that shudown is requested, and perfrom pthread_kill on main thread.
- when there is incoming ping, the admin thread checks the main thread, if it is doing msgrcv, the reply to ping ok, if not , then save in globals that ping reply is pending and let main thread at reach of next msgrcv reply on ping
- we shall support rqaddr, meaning that server either listens on single queue or it's own queue. So unix mode on shared mem should be enabled by default (allowing servers run on their own queues or on shared queue)
- ndrxd should act correspondingly - if shared, then remove Q only if last servant is off
- there should be global read/write locks protected dictionary of System V queues and Posix queue names, so that everything else does not break on Enduro/X
#1 Updated by Madars Vitolins 9 days ago
For timeout handling, we shall also use pthread_kill() by background thread. This means that client process will require background thread too. As it might perform timed calls (like tpcall with timeout). As there could be many user threads, the timeout thread shall perform scheduler for them all.