示例#1
0
文件: thread.cpp 项目: kaidokert/weos
void wait_for_all_signals(thread::signal_set flags)
{
    WEOS_ASSERT(flags > 0 && flags <= thread::all_signals());
    osEvent result = osSignalWait(flags, osWaitForever);
    if (result.status != osEventSignal)
        WEOS_THROW_SYSTEM_ERROR(cmsis_error::cmsis_error_t(result.status),
                                "wait_for_signalflags failed");
}
示例#2
0
文件: _array.hpp 项目: ombre5733/weos
    reference at(size_type index)
    {
#ifdef WEOS_ENABLE_EXCEPTIONS
        if (index >= TSize)
            throw WEOS_EXCEPTION(std::out_of_range("array::at()"));
#endif // WEOS_ENABLE_EXCEPTIONS
        WEOS_ASSERT(index < TSize);

        return _m_data[index];
    }
示例#3
0
文件: _array.hpp 项目: ombre5733/weos
 reference back()
 {
     WEOS_ASSERT(TSize > 0);
     return _m_data[TSize > 0 ? TSize - 1 : 0];
 }
示例#4
0
文件: _array.hpp 项目: ombre5733/weos
 const_reference asserting_at(size_type index) const
 {
     WEOS_ASSERT(index < TSize);
     return _m_data[index];
 }
示例#5
0
文件: _array.hpp 项目: ombre5733/weos
 reference front()
 {
     WEOS_ASSERT(TSize > 0);
     return _m_data[0];
 }