Changeset ad58fd2 in mainline for kernel/generic/include/cpu.h

Timestamp:
2022-08-15T16:31:58Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
46b305a
Parents:
742f95ec
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2022-08-15 16:26:16)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2022-08-15 16:31:58)
Message:

Make timeout→cpu immutable

We ensure timeout→cpu is only changed in timeout_register(),
which by its nature is externally synchronized with timeout_unregister(),
and internally synchronized with clock(). Thus in both those contexts,
timeout→cpu is always a valid constant pointing to the CPU of last
call to timeout_register().

Doing so removes the need for synchronization using timeout→lock.
Instead, timeout→link is synchronized by timeout→cpu→timeoutlock,
and all other fields of timeout_t are also immutable outside
timeout_register(), which means they are safely synchronized by
a combination of timeout→cpu→timoutlock and external sychronization
of timeout_register/unregister.

(No files)

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