Deprecated OSX functioon

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Deprecated OSX functioon

Ward Willats
This has been coming across my console when building Sqlite since upgrading to Mac OSX Sierra a few months ago. FWIW.


Building sqlite3 shell...
sqlite3.c:20839:17: warning: 'OSAtomicCompareAndSwapPtrBarrier' is deprecated: first deprecated in macOS 10.12 - Use atomic_compare_exchange_strong() from <stdatomic.h> instead [-Wdeprecated-declarations]
      success = OSAtomicCompareAndSwapPtrBarrier(NULL, newzone,
                ^
/usr/include/libkern/OSAtomicDeprecated.h:547:6: note: 'OSAtomicCompareAndSwapPtrBarrier' has been explicitly marked deprecated here
bool    OSAtomicCompareAndSwapPtrBarrier( void *__oldValue, void *__newValue, void * volatile *__theValue );
        ^
1 warning generated.

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Deprecated OSX functioon

James Walker-7
On 2/16/2017 7:40 AM, Ward WIllats wrote:

> This has been coming across my console when building Sqlite since upgrading to Mac OSX Sierra a few months ago. FWIW.
>
>
> Building sqlite3 shell...
> sqlite3.c:20839:17: warning: 'OSAtomicCompareAndSwapPtrBarrier' is deprecated: first deprecated in macOS 10.12 - Use atomic_compare_exchange_strong() from <stdatomic.h> instead [-Wdeprecated-declarations]
>       success = OSAtomicCompareAndSwapPtrBarrier(NULL, newzone,
>                 ^
> /usr/include/libkern/OSAtomicDeprecated.h:547:6: note: 'OSAtomicCompareAndSwapPtrBarrier' has been explicitly marked deprecated here
> bool    OSAtomicCompareAndSwapPtrBarrier( void *__oldValue, void *__newValue, void * volatile *__theValue );
>         ^
> 1 warning generated.

For what it's worth, the OS header recommends replacing it with the
function atomic_compare_exchange_strong, which I assume refers to the
C++11 template function.

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Deprecated OSX functioon

Jens Alfke-2

> On Feb 16, 2017, at 1:02 PM, James Walker <[hidden email]> wrote:
>
> For what it's worth, the OS header recommends replacing it with the function atomic_compare_exchange_strong, which I assume refers to the C++11 template function.

It’s also available in C as a macro defined in <stdatomic.h>.
(At least, it’s in Clang’s C library.)

—Jens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users