- * Locking protocol:
- *
- * This thread uses a mutex and condition variable to wait for incoming messages
- * on its queue. The main thread interacts with these through the tr_trpc_mq_cb()
- * callback. This callback is called by the TR_MQ whenever the queue goes from empty
- * to non-empty. The callback locks the thread's mutex, then sets a msg_ready flag
- * signals the condition variable, then unlocks the mutex.
- *
- * This thread waits for the condition variable to be signaled, then checks that the
- * msg_ready flag has actually been set (pthreads does not guarantee against false
- * wakes). If so, it holds the mutex lock while reading any messages in its queue and
- * sending responses over the GSS connection. If it receives an ABORT message from
- * the main thread (not currently used), or if sending the GSS message fails (which
- * usually indicates that the connection has been lost), the thread begins the shutdown
- * process. It still holds the mutex lock at the start of this process.
+ * Opens a connection to a peer. If successful, notifies the trps thread by
+ * posting a TR_MQMSG_TRPC_CONNECTED message to the trps message queue.
+ * It then waits for messages on trpc->mq. Normally these will be TR_MQMSG_TRPC_SEND
+ * messages, which this thread forwards to the peer. If its connection is lost or
+ * a TR_MQMSG_ABORT message is received on trpc->mq, the thread sends a
+ * TR_MQMSG_TRPC_DISCONNECTED message to the trps thread, then cleans up and
+ * terminates.