NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/48601: some architectures are missing a __sync_lock_test_and_set_8 implementation

>Number:         48601
>Category:       lib
>Synopsis:       some architectures are missing a __sync_lock_test_and_set_8 
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 18 10:25:00 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 6.99.30
The NetBSD Foundation, Inc.
System: NetBSD 6.99.30 NetBSD 6.99.30 
(WHOEVER) #106: Thu Jan 30 21:52:06 CET 2014 
Architecture: sparc64
Machine: sparc64

Some architectures (i386 is one) are missing an implementation of

Basically this should do an atomic set of a 64 bit value:

uin64_t __sync_lock_test_and_set_8(volatile uint64_t *addr, uint64_t val)
        uint64_t old = *addr;
        *addr = val;
        return old;

But all this done atomically - needs someone (for at least i386) to understand
the early cpu differences and the patch maze in src/common/libc/arch/i386/atomic

Other architectures are likely affected as well (will gather a list in that
test case).

Uncomment the relevant lines from /usr/src/tests/lib/libc/sync and try to
compile it.


Home | Main Index | Thread Index | Old Index