You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Wait until a Semaphore resource becomes available.
88
100
@param millisec absolute timeout time, referenced to Kernel::get_ms_count()
89
101
@return true if a resource was acquired, false otherwise.
@@ -93,9 +105,24 @@ class Semaphore : private mbed::NonCopyable<Semaphore> {
93
105
the acquire attempt will time out earlier than specified.
94
106
95
107
@note You cannot call this function from ISR context.
108
+
@deprecated Pass a chrono time_point, not an integer millisecond count. For example use
109
+
`Kernel::Clock::now() + 5s` rather than `Kernel::get_ms_count() + 5000`.
96
110
*/
111
+
MBED_DEPRECATED_SINCE("mbed-os-6.0.0", "Pass a chrono time_point, not an integer millisecond count. For example use `Kernel::Clock::now() + 5s` rather than `Kernel::get_ms_count() + 5000`.")
97
112
booltry_acquire_until(uint64_t millisec);
98
113
114
+
/** Wait until a Semaphore resource becomes available.
115
+
@param millisec absolute timeout time, referenced to Kernel::get_ms_count()
116
+
@return true if a resource was acquired, false otherwise.
117
+
@note the underlying RTOS may have a limit to the maximum wait time
118
+
due to internal 32-bit computations, but this is guaranteed to work if the
119
+
wait is <= 0x7fffffff milliseconds (~24 days). If the limit is exceeded,
120
+
the acquire attempt will time out earlier than specified.
121
+
122
+
@note You cannot call this function from ISR context.
0 commit comments