mbed-os5 only for TYBLE16
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Diff: rtos/ThisThread.h
- Revision:
- 1:9db0e321a9f4
- Parent:
- 0:5b88d5760320
--- a/rtos/ThisThread.h Tue Dec 17 23:23:45 2019 +0000 +++ b/rtos/ThisThread.h Tue Dec 31 06:02:27 2019 +0000 @@ -1,5 +1,5 @@ /* mbed Microcontroller Library - * Copyright (c) 2006-2018 ARM Limited + * Copyright (c) 2006-2019 ARM Limited * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,18 +23,12 @@ #define THIS_THREAD_H #include <stdint.h> -#include "cmsis_os2.h" -#include "mbed_rtos1_types.h" -#include "mbed_rtos_storage.h" -#include "platform/Callback.h" -#include "platform/mbed_toolchain.h" -#include "platform/NonCopyable.h" -#include "rtos/Semaphore.h" -#include "rtos/Mutex.h" +#include "rtos/mbed_rtos_types.h" namespace rtos { -/** \addtogroup rtos */ +/** \addtogroup rtos-public-api */ /** @{*/ + /** * \defgroup rtos_ThisThread ThisThread namespace * @{ @@ -154,6 +148,7 @@ /** Sleep for a specified time period in millisec: @param millisec time delay value @note You cannot call this function from ISR context. + @note The equivalent functionality is accessible in C via thread_sleep_for. */ void sleep_for(uint32_t millisec); @@ -163,6 +158,7 @@ @note You cannot call this function from ISR context. @note if millisec is equal to or lower than the current tick count, this returns immediately. + @note The equivalent functionality is accessible in C via thread_sleep_until. */ void sleep_until(uint64_t millisec); @@ -174,13 +170,13 @@ void yield(); /** Get the thread id of the current running thread. - @return thread ID for reference by other functions or NULL in case of error or in ISR context. + @return thread ID for reference by other functions or nullptr in case of error or in ISR context. @note You may call this function from ISR context. */ osThreadId_t get_id(); /** Get the thread name of the current running thread. - @return thread name pointer or NULL if thread has no name or in case of error. + @return thread name pointer or nullptr if thread has no name or in case of error. @note You cannot call this function from ISR context. */ const char *get_name(); @@ -188,7 +184,23 @@ }; /** @}*/ /** @}*/ + + +namespace internal { +/** \addtogroup rtos-internal-api */ +/** @{*/ + +struct flags_check_capture { + uint32_t *flags; + uint32_t options; + uint32_t flags_wanted; + uint32_t result; + bool match; +}; + +bool non_rtos_check_flags(void *handle); + +} +/** @}*/ } #endif - -