Don't inline this function so the timeout_callback won't have its storage * space on the stack cleaned up before the call to schedule(). */
| 215 | /* Don't inline this function so the timeout_callback won't have its storage |
| 216 | * space on the stack cleaned up before the call to schedule(). */ |
| 217 | static int __attribute__((noinline)) |
| 218 | thread_yield_timed_callback(struct timeout_callback *tocb, |
| 219 | unsigned int microsecs) |
| 220 | { |
| 221 | tocb->priv = current_thread(); |
| 222 | tocb->callback = thread_resume_from_timeout; |
| 223 | |
| 224 | if (timer_sched_callback(tocb, microsecs)) |
| 225 | return -1; |
| 226 | |
| 227 | /* The timer callback will wake up the current thread. */ |
| 228 | schedule(NULL); |
| 229 | return 0; |
| 230 | } |
| 231 | |
| 232 | static void *thread_alloc_space(struct thread *t, size_t bytes) |
| 233 | { |
no test coverage detected