Page MenuHomeFreeBSD

emulated atomic64: disable interrupts as the lock mechanism on !SMP
ClosedPublic

Authored by kevans on Jan 3 2020, 1:17 AM.
Tags
None
Referenced Files
F106321535: D23015.diff
Sat, Dec 28, 4:23 PM
Unknown Object (File)
Wed, Dec 18, 1:33 AM
Unknown Object (File)
Nov 23 2024, 3:38 PM
Unknown Object (File)
Nov 11 2024, 1:14 AM
Unknown Object (File)
Oct 20 2024, 3:04 AM
Unknown Object (File)
Oct 1 2024, 2:04 PM
Unknown Object (File)
Sep 30 2024, 3:57 AM
Unknown Object (File)
Sep 28 2024, 11:34 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 28450

Event Timeline

sys/kern/subr_atomic64.c
78

Why not make LOCK_A64() be more like:

{ register s; s = intr_disable();

and UNLOCK_A64() be:

intr_restore(s); }

Then you don't need the added LOCK_DECL.

I think pthread_cleanup_push() and pthread_cleanup_pop() do something like this.

kevans marked an inline comment as done.

Use better construct to eliminate separate LOCK_DECL that's only used for !SMP

This revision is now accepted and ready to land.Jan 3 2020, 3:26 PM

The changes look good to me as well.