29,14 → 29,14 |
#ifndef __SYNCH_H__ |
#define __SYNCH_H__ |
|
#define SYNCH_NO_TIMEOUT 0 |
#define SYNCH_BLOCKING 0 |
#define SYNCH_NON_BLOCKING 1 |
#define SYNCH_NO_TIMEOUT 0 /**< No timeout is request. */ |
#define SYNCH_BLOCKING 0 /**< Blocking operation request. */ |
#define SYNCH_NON_BLOCKING 1 /**< Non-blocking operation request. */ |
|
#define ESYNCH_WOULD_BLOCK 1 |
#define ESYNCH_TIMEOUT 2 |
#define ESYNCH_OK_ATOMIC 4 |
#define ESYNCH_OK_BLOCKED 8 |
#define ESYNCH_WOULD_BLOCK 1 /**< Could not satisfy the request without going to sleep. */ |
#define ESYNCH_TIMEOUT 2 /**< Timeout occurred. */ |
#define ESYNCH_OK_ATOMIC 4 /**< Operation succeeded without sleeping. */ |
#define ESYNCH_OK_BLOCKED 8 /**< Operation succeeded and did sleep. */ |
|
#define SYNCH_FAILED(rc) ((rc) & (ESYNCH_WOULD_BLOCK | ESYNCH_TIMEOUT)) |
#define SYNCH_OK(rc) ((rc) & (ESYNCH_OK_ATOMIC | ESYNCH_OK_BLOCKED)) |