Title: sr_repl_queue()


If repl_queue is not empty, sr_repl_queue(proc, ref, operation) is called to send all messages (which will be REVIVE messages) in repl_queue to the file system. If called with proc, sr_repl_queue()'s first parameter, set to ANY (#define'd in include/minix/com.h - this value is not within allowable range of process numbers), sr_repl_queue() goes through repl_queue and sends each reply message to the appropriate process. If called with proc set to a specific process number (which is the case when sr_rec() is processing an NW_CANCEL message), sr_repl_queue() goes through repl_queue and sends every REVIVE message except for any messages destined for the process specified by proc (if any exist). sr_repl_queue() finally sends the message destined to the process specified by proc after all other messages have been sent. While the file system is still interested in the REVIVE message, the priority goes to other replies.

In addition to sending all the reply messages queued in repl_queue, sr_repl_queue() frees the messages in repl_queue for later use and sets repl_queue to NULL.

A return value of 1 indicates that a message in repl_queue was canceled. A return value of 0 indicates that no messages were canceled.

The second and third parameters (ref and operation) are never used in sr_repl_queue().