22typedef unsigned int dtStatus;
25static const unsigned int DT_FAILURE = 1u << 31;
26static const unsigned int DT_SUCCESS = 1u << 30;
27static const unsigned int DT_IN_PROGRESS = 1u << 29;
30static const unsigned int DT_STATUS_DETAIL_MASK = 0x0ffffff;
31static const unsigned int DT_WRONG_MAGIC = 1 << 0;
32static const unsigned int DT_WRONG_VERSION = 1 << 1;
33static const unsigned int DT_OUT_OF_MEMORY = 1 << 2;
34static const unsigned int DT_INVALID_PARAM = 1 << 3;
35static const unsigned int DT_BUFFER_TOO_SMALL = 1 << 4;
36static const unsigned int DT_OUT_OF_NODES = 1 << 5;
37static const unsigned int DT_PARTIAL_RESULT = 1 << 6;
38static const unsigned int DT_ALREADY_OCCUPIED = 1 << 7;
42inline bool dtStatusSucceed(dtStatus status)
44 return (status & DT_SUCCESS) != 0;
48inline bool dtStatusFailed(dtStatus status)
50 return (status & DT_FAILURE) != 0;
54inline bool dtStatusInProgress(dtStatus status)
56 return (status & DT_IN_PROGRESS) != 0;
60inline bool dtStatusDetail(dtStatus status,
unsigned int detail)
62 return (status & detail) != 0;