prepare_shutdown minix - Minix

This is a discussion on prepare_shutdown minix - Minix ; In the function prepare_shutdown, the comments said "Continue after 1 second, to give processes a chance to get scheduled to do shutdown work". But I didn't find where 1 second be setting?...

+ Reply to Thread
Results 1 to 2 of 2

Thread: prepare_shutdown minix

  1. prepare_shutdown minix

    In the function prepare_shutdown, the comments said "Continue after 1
    second, to give processes a chance to get scheduled to do shutdown
    work". But I didn't find where 1 second be setting?

  2. Re: prepare_shutdown minix

    > In the function prepare_shutdown, the comments said "Continue after 1
    > second, to give processes a chance to get scheduled to do shutdown
    > work". But I didn't find where 1 second be setting?


    This function call does it:

    set_timer(&shutdown_timer, get_uptime() + HZ, shutdown);

    It causes shutdown to be called after HZ ticks. As there are HZ ticks
    per second, this is exactly one second.

+ Reply to Thread