Changeset 39026d7c in mainline for uspace/lib/c/generic/async.c


Ignore:
Timestamp:
2017-11-29T23:41:05Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
908d634
Parents:
f300523
Message:

Replace fibril_usleep() with async_usleep().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async.c

    rf300523 r39026d7c  
    18681868       
    18691869        amsg_destroy(msg);
     1870}
     1871
     1872/** Delay execution for the specified number of seconds
     1873 *
     1874 * @param sec Number of seconds to sleep
     1875 */
     1876void async_sleep(unsigned int sec)
     1877{
     1878        /*
     1879         * Sleep in 1000 second steps to support
     1880         * full argument range
     1881         */
     1882
     1883        while (sec > 0) {
     1884                unsigned int period = (sec > 1000) ? 1000 : sec;
     1885
     1886                async_usleep(period * 1000000);
     1887                sec -= period;
     1888        }
    18701889}
    18711890
Note: See TracChangeset for help on using the changeset viewer.