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
Unknown Object (File)
Wed, Nov 19, 12:26 AM
Unknown Object (File)
Sun, Nov 16, 4:11 AM
Unknown Object (File)
Sun, Nov 9, 5:39 AM
Unknown Object (File)
Fri, Nov 7, 3:46 AM
Unknown Object (File)
Tue, Nov 4, 6:18 AM
Unknown Object (File)
Sun, Nov 2, 8:44 PM
Unknown Object (File)
Sat, Nov 1, 11:58 PM
Unknown Object (File)
Sat, Nov 1, 5:53 AM
Subscribers

Diff Detail

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

Event Timeline

sys/kern/subr_atomic64.c
77

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.