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
* @param abs_time Absolute timeout time, referenced to Kernel::Clock.
146
+
*
147
+
* @return Pointer to memory block that you can fill with mail or nullptr in case error.
148
+
*
149
+
* @note You cannot call this function from ISR context.
150
+
* @note the underlying RTOS may have a limit to the maximum wait time
151
+
* due to internal 32-bit computations, but this is guaranteed to work if the
152
+
* wait is <= 0x7fffffff milliseconds (~24 days). If the limit is exceeded,
153
+
* the wait will time out earlier than specified.
154
+
*/
155
+
T *alloc_until(Kernel::Clock::time_point abs_time)
156
+
{
157
+
return _pool.alloc_until(abs_time);
126
158
}
127
159
128
160
/** Allocate a memory block of type T, blocking.
@@ -136,10 +168,13 @@ class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
136
168
* due to internal 32-bit computations, but this is guaranteed to work if the
137
169
* wait is <= 0x7fffffff milliseconds (~24 days). If the limit is exceeded,
138
170
* the wait will time out earlier than specified.
171
+
* @deprecated Pass a chrono time_point, not an integer millisecond count. For example use `Kernel::Clock::now() + 5s`
172
+
* rather than `Kernel::get_ms_count() + 5000`.
139
173
*/
174
+
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`.")
/** Allocate a memory block of type T, blocking, and set memory block to zero.
223
+
*
224
+
* @param abs_time Absolute timeout time, referenced to Kernel::Clock.
225
+
*
226
+
* @return Pointer to memory block that you can fill with mail or nullptr in case error.
227
+
*
228
+
* @note You cannot call this function from ISR context.
229
+
* @note the underlying RTOS may have a limit to the maximum wait time
230
+
* due to internal 32-bit computations, but this is guaranteed to work if the
231
+
* wait is <= 0x7fffffff milliseconds (~24 days). If the limit is exceeded,
232
+
* the wait will time out earlier than specified.
233
+
*/
234
+
T *calloc_until(Kernel::Clock::time_point abs_time)
235
+
{
236
+
return _pool.calloc_until(abs_time);
170
237
}
171
238
172
239
/** Allocate a memory block of type T, blocking, and set memory block to zero.
@@ -180,10 +247,13 @@ class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
180
247
* due to internal 32-bit computations, but this is guaranteed to work if the
181
248
* wait is <= 0x7fffffff milliseconds (~24 days). If the limit is exceeded,
182
249
* the wait will time out earlier than specified.
250
+
* @deprecated Pass a chrono time_point, not an integer millisecond count. For example use `Kernel::Clock::now() + 5s`
251
+
* rather than `Kernel::get_ms_count() + 5000`.
183
252
*/
253
+
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`.")
due to internal 32-bit computations, but this is guaranteed to work if the
115
138
wait is <= 0x7fffffff milliseconds (~24 days). If the limit is exceeded,
116
139
the wait will time out earlier than specified.
140
+
@deprecated Pass a chrono time_point, not an integer millisecond count. For example use `Kernel::Clock::now() + 5s`
141
+
rather than `Kernel::get_ms_count() + 5000`.
117
142
*/
143
+
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`.")
due to internal 32-bit computations, but this is guaranteed to work if the
168
221
wait is <= 0x7fffffff milliseconds (~24 days). If the limit is exceeded,
169
222
the wait will time out earlier than specified.
223
+
@deprecated Pass a chrono time_point, not an integer millisecond count. For example use `Kernel::Clock::now() + 5s`
224
+
rather than `Kernel::get_ms_count() + 5000`.
170
225
*/
226
+
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`.")
0 commit comments