Re: [Gc] libatomic-ops nios2

Hans Boehm <[email protected]> Wed, 27 Jan 2016 18:02:37 -0800
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <CAPUmR1ZLvq_KeUZRy=c0=Nsow1FovG6ghNCeaoSPRAPiHYj1sQ@mail.gmail.com>
I know nothing about this particular processor.  But I think it would
generally be very useful if we had a libatomic_ops implementation that just
relied on C11 atomics, which seem to now be quite widely available..
That's probably easier than a custom implementation, and it should avoid
redoing this work for future processors.

Libatomic_ops predates C++11/C11 atomics.  Experience with the former
contributed to the latter.  It would be good to eventually replace
libatomic_ops.

I would expect that C11 atomics use the helper, but I don't know that.

Hans

On Wed, Jan 27, 2016 at 12:43 PM, Marek Vasut <[email protected]> wrote:

> Hello,
>
> I am trying to add support for nios2 CPU into libatomic-ops and gc .
> The Linux kernel exports kuser helper for cmpxchg [1], so I believe
> this might be the way to go? Or shall I somehow use the gcc atomic
> builtin ops [2] ? Note that nios2 does not have dedicated atomic
> instructions which could be used in userland, that's why the kuser
> helper.
>
> Thank you for any input!
>
> [1] http://lxr.free-electrons.com/source/arch/nios2/kernel/entry.S#L535
> [2]
> https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/nios2/linux-
> atomic.c
>
> Best regards,
> Marek Vasut
> _______________________________________________
> bdwgc mailing list
> [email protected]
> https://lists.opendylan.org/mailman/listinfo/bdwgc
>

_______________________________________________
bdwgc mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/bdwgc