Changeset 9a99aa5 in mainline for uspace/lib/posix/source/time.c


Ignore:
Timestamp:
2017-05-30T19:35:46Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
316795c
Parents:
134e3f1
Message:

Fibrils need sleep, too.

File:
1 edited

Legend:

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

    r134e3f1 r9a99aa5  
    4545#include "posix/assert.h"
    4646
     47#include "libc/fibril_synch.h"
    4748#include "libc/malloc.h"
    4849#include "libc/task.h"
     
    5051#include "libc/stdbool.h"
    5152#include "libc/stddef.h"
    52 #include "libc/thread.h"
    5353#include "libc/sys/time.h"
    5454
     
    315315                        // TODO: interruptible sleep
    316316                        if (rqtp->tv_sec != 0) {
    317                                 thread_sleep(rqtp->tv_sec);
     317                                fibril_sleep(rqtp->tv_sec);
    318318                        }
    319319                        if (rqtp->tv_nsec != 0) {
    320                                 thread_usleep(rqtp->tv_nsec / 1000);
     320                                fibril_usleep(rqtp->tv_nsec / 1000);
    321321                        }
    322322                        return 0;
Note: See TracChangeset for help on using the changeset viewer.