Changeset 132ab5d1 in mainline for uspace/lib/posix/source/time.c


Ignore:
Timestamp:
2018-01-30T03:20:45Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a6cc679
Parents:
8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge commit '6a5d05bd2551e64111bea4f9332dd7448c26ce84' into forwardport

Separate return value from error code in gen_irq_code*().

File:
1 edited

Legend:

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

    r8bfb163 r132ab5d1  
    4141
    4242#include "posix/ctype.h"
    43 #include "posix/errno.h"
     43
     44#include <errno.h>
     45
    4446#include "posix/signal.h"
    4547#include "posix/assert.h"
    4648
    47 #include "libc/fibril_synch.h"
     49#include "libc/async.h"
    4850#include "libc/malloc.h"
    4951#include "libc/task.h"
     
    100102    struct tm *restrict result)
    101103{
    102         int rc = time_utc2tm(*timer, result);
    103         if (rc != EOK) {
    104                 errno = rc;
     104        if (failed(time_utc2tm(*timer, result))) {
    105105                return NULL;
    106106        }
     
    197197char *posix_ctime_r(const time_t *timer, char *buf)
    198198{
    199         int r = time_local2str(*timer, buf);
    200         if (r != EOK) {
    201                 errno = r;
     199        if (failed(time_local2str(*timer, buf))) {
    202200                return NULL;
    203201        }
     
    314312                        // TODO: interruptible sleep
    315313                        if (rqtp->tv_sec != 0) {
    316                                 fibril_sleep(rqtp->tv_sec);
     314                                async_sleep(rqtp->tv_sec);
    317315                        }
    318316                        if (rqtp->tv_nsec != 0) {
    319                                 fibril_usleep(rqtp->tv_nsec / 1000);
     317                                async_usleep(rqtp->tv_nsec / 1000);
    320318                        }
    321319                        return 0;
Note: See TracChangeset for help on using the changeset viewer.