Changeset 1894 for trunk/src


Ignore:
Timestamp:
Apr 24, 2005, 8:11:46 AM (20 years ago)
Author:
bird
Message:

implemented nanosleep() and base usleep and sleep on it.

Location:
trunk/src/emx
Files:
2 added
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/InnoTekLIBC/backend.h

    • Property cvs2svn:cvs-rev changed from 1.16 to 1.17
    r1893 r1894  
    9090 */
    9191void __libc_Back_threadEnd(void *pExpRegRec);
     92
     93/**
     94 * Suspend execution of the current thread for a given number of nanoseconds
     95 * or till a signal is received.
     96 *
     97 * @returns 0 on success.
     98 * @returns -EINVAL if the pReqTS is invalid.
     99 * @returns -EINTR if the interrupted by signal.
     100
     101 * @param   ullNanoReq      Time to sleep, in nano seconds.
     102 * @param   pullNanoRem     Where to store remaining time (also nano seconds).
     103
     104 * @remark  For relativly small sleeps this api temporarily changes the thread
     105 *          priority to timecritical (that is, if it's in the normal or idle priority
     106 *          classes) to increase precision. This means that if a signal or other
     107 *          asyncronous event is executed, it will be executed at wrong priority.
     108 *          It also means that if such code changes the priority it will be undone.
     109 */
     110int __libc_Back_threadSleep(unsigned long long ullNanoReq, unsigned long long *pullNanoRem);
    92111
    93112/** @} */
  • trunk/src/emx/include/InnoTekLIBC/logstrict.h

    • Property cvs2svn:cvs-rev changed from 1.11 to 1.12
    r1893 r1894  
    184184#define __LIBC_LOG_GRP_MMAN         16
    185185
     186/** Backend Thread APIs. */
     187#define __LIBC_LOG_GRP_BACK_THREAD  18
    186188/** Backend Process APIs. */
    187189#define __LIBC_LOG_GRP_BACK_PROCESS 19
  • trunk/src/emx/src/lib/bsd/gen/sleep.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1893 r1894  
    4646
    4747unsigned int
    48 __sleep(seconds)
     48_STD(sleep)(seconds)
    4949        unsigned int seconds;
    5050{
     
    6969}
    7070
    71 __weak_reference(__sleep, sleep);
    72 __weak_reference(__sleep, _sleep);
     71/*_ _ w e a k  _ r e f e r e n c e (__sleep, sleep);
     72 _ _ w e a k _ r e f e r e n c e(__sleep, _sleep); */
  • trunk/src/emx/src/lib/bsd/gen/usleep.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1893 r1894  
    4444
    4545int
    46 usleep(useconds)
     46_STD(usleep)(useconds)
    4747        useconds_t useconds;
    4848{
  • trunk/src/emx/src/lib/libc.def

    • Property cvs2svn:cvs-rev changed from 1.95 to 1.96
    r1893 r1894  
    14781478    "___ulp_D2A" @1487
    14791479    "___dtoa" @1488
     1480    ; april coding...
     1481    "__std_nanosleep" @1489
     1482    "___libc_Back_threadSleep" @1490
  • trunk/src/emx/src/lib/sys/logstrict.c

    • Property cvs2svn:cvs-rev changed from 1.18 to 1.19
    r1893 r1894  
    446446            { 1, "MMAN" },              /* 16 */
    447447            { 1, "future" },            /* 17 */
    448             { 1, "future" },            /* 18 */
    449             { 1, "future" },            /* 19 */
     448            { 1, "BACK_THREAD" },       /* 18 */
     449            { 1, "BACK_PROCESS" },      /* 19 */
    450450            { 1, "BACK_SIGNAL" },       /* 20 */
    451451            { 1, "BACK_MMAN" },         /* 21 */
Note: See TracChangeset for help on using the changeset viewer.