Changeset 897fd8f1 in mainline for kernel/generic/include


Ignore:
Timestamp:
2017-12-19T18:18:15Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
55b56f4
Parents:
7f11dc6
Message:

Use <errno.h> instead of special ESYNCH_xx error codes.

Location:
kernel/generic/include/synch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/synch/semaphore.h

    r7f11dc6 r897fd8f1  
    3636#define KERN_SEMAPHORE_H_
    3737
     38#include <errno.h>
    3839#include <stdint.h>
    3940#include <synch/waitq.h>
     
    5455
    5556#define semaphore_down_interruptable(s) \
    56         (ESYNCH_INTERRUPTED != _semaphore_down_timeout((s), SYNCH_NO_TIMEOUT, \
    57                 SYNCH_FLAGS_INTERRUPTIBLE))
     57        (_semaphore_down_timeout((s), SYNCH_NO_TIMEOUT, \
     58                SYNCH_FLAGS_INTERRUPTIBLE) != EINTR)
    5859
    5960extern void semaphore_initialize(semaphore_t *, int);
  • kernel/generic/include/synch/waitq.h

    r7f11dc6 r897fd8f1  
    6767
    6868#define waitq_sleep(wq) \
    69         waitq_sleep_timeout((wq), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
     69        waitq_sleep_timeout((wq), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE, NULL)
    7070
    7171struct thread;
    7272
    7373extern void waitq_initialize(waitq_t *);
    74 extern int waitq_sleep_timeout(waitq_t *, uint32_t, unsigned int);
     74extern int waitq_sleep_timeout(waitq_t *, uint32_t, unsigned int, bool *);
    7575extern ipl_t waitq_sleep_prepare(waitq_t *);
    76 extern int waitq_sleep_timeout_unsafe(waitq_t *, uint32_t, unsigned int);
    77 extern void waitq_sleep_finish(waitq_t *, int, ipl_t);
     76extern int waitq_sleep_timeout_unsafe(waitq_t *, uint32_t, unsigned int, bool *);
     77extern void waitq_sleep_finish(waitq_t *, bool, ipl_t);
    7878extern void waitq_wakeup(waitq_t *, wakeup_mode_t);
    7979extern void _waitq_wakeup_unsafe(waitq_t *, wakeup_mode_t);
Note: See TracChangeset for help on using the changeset viewer.