jackaudio / jack1

jack1 codebase
Other
250 stars 71 forks source link

config/cpu cleanup #58

Closed jcowgill closed 7 years ago

jcowgill commented 7 years ago

Fixes #56

It turns out all the cycles.h files are also unused, so I've removed those as well. The atomicity.h files could also be replaced with the generic implementation but I wasn't sure if that was kept for a reason (other platforms?)

jdek commented 7 years ago

Did you test the other platforms? (Do they still work?)

jcowgill commented 7 years ago

No, I haven't. I simply removed the files based on them never being included anywhere else in the jack codebase. In theory this PR has absolutely no effect on any platform.

adiknoth commented 7 years ago

@jcowgill I think we should replace the atomicity.h files with the generic one - pretty much everyone should be using the compiler builtins by now.

If you want to send another PR, I'm happy to merge.

Thanks

jcowgill commented 7 years ago

@adiknoth OK I can send another PR. Does jack have a minimum GCC version? I ask because the __sync functions are deprecated and should be replaced if possible. For GCC, __sync* requires 4.1, __atomic* requires 4.7, and C11's stdatomic.h requires 4.9.

adiknoth commented 7 years ago

Let's use C11 if available or 4.7 if not. GCC 4.9 was released in April 2014, that's almost three years, 4.7 in March 2012, almost five years.

According to wikipedia: "A standard macro __STDCVERSION_\ is defined with value 201112L to indicate that C11 support is available."

So we can have something like

`

if __STDC_VERSION__ >= 201112L

include

...

else

...

fi

`

Thanks!