[haiku-gsoc] Re: Implementation Queries

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Wed, 21 Jun 2017 07:09:05 +0200

On Wed, Jun 21, 2017 at 01:30:02AM +0530, Vivek Roy wrote:

How about I implement all of asm/atomic.h using GCC builtins? Would that be
an over-kill? One clear advantage would be "No name conflicts" (e.g.
presently I have linux_atomic_add because without the linux prefix there
would be name conflict with Haiku's atomic_add in SupportDefs.h)

We can't change the Linux atomics to do the same thing as Haiku's (then
DRM wouldn't work right). We can't change the Haiku ones to do the same
thing as Linux (it would break all the apps using them). So, we have no
choice but to have two sets of functions. Unless you are sure there are
functions that do exactly the same thing in both worlds, that is, in
which case the implementation can be shared.

-- 
Adrien.

Other related posts: