[riot-notifications] [RIOT-OS/RIOT] core/mutex: Cleanup (#15327)
Marian Buschsieweke
notifications at github.com
Fri Nov 6 18:26:33 CET 2020
@maribu commented on this pull request.
> - mutex->queue.next->next = NULL;
- }
- else {
- thread_add_to_list(&mutex->queue, me);
- }
- irq_restore(irqstate);
- thread_yield_higher();
- /* We were woken up by scheduler. Waker removed us from queue.
- * We have the mutex now. */
- return 1;
+
+ thread_t *me = thread_get_active();
+ DEBUG("PID[%" PRIkernel_pid "]: Adding node to mutex queue: prio: %"
+ PRIu32 "\n", thread_getpid(), (uint32_t)me->priority);
+ sched_set_status(me, STATUS_MUTEX_BLOCKED);
+ if (mutex->queue.next == MUTEX_LOCKED) {
[pong](https://github.com/RIOT-OS/RIOT/pull/15398)!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15327#discussion_r518896656
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201106/fdc36080/attachment.htm>
More information about the notifications
mailing list