Changeset 582a0b8 in mainline for uspace/lib/posix/source/time.c


Ignore:
Timestamp:
2017-05-08T19:20:39Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d2c8533
Parents:
73db198
Message:

Remove unistd.h

  • Rename usleep() and sleep() to thread_usleep() and thread_sleep() and move to thread.[hc].
  • Include stddef.h in order to provide NULL.
  • Move getpagesize() to libposix.
  • Sync uspace/dist/src/c/demos with originals.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/time.c

    r73db198 r582a0b8  
    4949#include "libc/stats.h"
    5050#include "libc/stdbool.h"
     51#include "libc/stddef.h"
     52#include "libc/thread.h"
    5153#include "libc/sys/time.h"
    5254
     
    313315                        // TODO: interruptible sleep
    314316                        if (rqtp->tv_sec != 0) {
    315                                 sleep(rqtp->tv_sec);
     317                                thread_sleep(rqtp->tv_sec);
    316318                        }
    317319                        if (rqtp->tv_nsec != 0) {
    318                                 usleep(rqtp->tv_nsec / 1000);
     320                                thread_usleep(rqtp->tv_nsec / 1000);
    319321                        }
    320322                        return 0;
Note: See TracChangeset for help on using the changeset viewer.