asst1-Synchronization/kern/asst1/client_server_tester.c
static void
stop_server_threads()
{
        int i;

        for(i = 0; i < NUM_SERVERS; i++) {
                /* 
                 * Our protocol for stopping server threads is to send
                 * NUM_SERVERS NULL requests.
                 */
                work_queue_enqueue(NULL);
        }

        /* Now wait for all servers to signal completion. */
        for(i = 0; i < NUM_SERVERS; i++) {
                P(servers_finished);
        }

        kprintf("All %d server threads have exited.\n", NUM_SERVERS);

}
/* 
 * Instruct all server threads to exit and then wait for them to
 * indicate that they have exited. Server threads run until told
 * to stop using the special NULL request.
 */
Instruct all server threads to exit and then wait for them to
indicate that they have exited. Server threads run until told
to stop using the special NULL request.
Instruct all server threads to exit and then wait for them to indicate that they have exited . Server threads run until told to stop using the special NULL request .
static void
stop_server_threads()
{
        int i;
        for(i = 0; i < NUM_SERVERS; i++) {
                work_queue_enqueue(NULL);
        }
        for(i = 0; i < NUM_SERVERS; i++) {
                P(servers_finished);
        }
        kprintf("All %d server threads have exited.\n", NUM_SERVERS);
}
static void stop_server_threads ( ) { int i ; for ( i = 0 ; i < NUM_SERVERS ; i ++ ) { work_queue_enqueue ( NULL ) ; } for ( i = 0 ; i < NUM_SERVERS ; i ++ ) { P ( servers_finished ) ; } kprintf ( " \n " , NUM_SERVERS ) ; }
Instruct all server threads to exit and then wait for them to
 indicate that they have exited.
Instruct all server threads to exit and then wait for them to indicate that they have exited .
/* 
                 * Our protocol for stopping server threads is to send
                 * NUM_SERVERS NULL requests.
                 */ /* Now wait for all servers to signal completion. */