Changeset 8a18d5b in mainline for kernel/generic/src/proc/thread.c

Timestamp:
2018-11-11T15:47:39Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
269bc459
Parents:
0b5203b
git-author:
Jakub Jermar <jakub@…> (2018-11-10 16:22:29)
git-committer:
Jakub Jermar <jakub@…> (2018-11-11 15:47:39)
Message:

Preallocate the waitq handle

This fixes a race condition (a missing wakeup) when the wakeup was
faster than the thread going to sleep and no handle was allocated yet.
The handle get preallocated to avoid a possible allocation failure in
wakeup.

We also switched to using atomic_compare_exchange_weak_explicit() to fix
ARMv4 and ARMv5 builds.

(No files)

Note: See TracChangeset for help on using the changeset viewer.