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)
Tue, Oct 6, 2:18 AM
Unknown Object (File)
Sat, Sep 26, 4:56 PM
Unknown Object (File)
Wed, Sep 23, 5:24 PM
Unknown Object (File)
Tue, Sep 22, 9:19 PM
Unknown Object (File)
Tue, Sep 22, 12:13 PM
Unknown Object (File)
Mon, Sep 21, 9:46 AM
Unknown Object (File)
Fri, Sep 11, 4:33 PM
Unknown Object (File)
Fri, Sep 11, 4:28 PM
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.