Fix prototype for atomic_add
bastring declares the prototype for atomic_add, as it can't rely on
haiku-specific headers. Have this declaration match the modified
prototype from Scheduler branch merge.
Matches commit 73ad2473e7874b3702cf5b0fdf4c81b747812ed9 on Haiku side.
Diff
legacy/gcc/libstdc++/std/bastring.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -66,7 +66,7 @@
#endif
#ifdef __HAIKU__
extern "C" __haiku_int32 atomic_add(volatile __haiku_int32* value,
extern "C" __haiku_int32 atomic_add(__haiku_int32* value,
__haiku_int32 addvalue);
#endif
@@ -82,7 +82,7 @@
charT* data () { return reinterpret_cast<charT *>(this + 1); }
charT& operator[] (size_t s) { return data () [s]; }
#ifdef __HAIKU__
charT* grab () { if (selfish) return clone (); atomic_add((volatile __haiku_int32*) &ref, 1); return data (); }
charT* grab () { if (selfish) return clone (); atomic_add((__haiku_int32*) &ref, 1); return data (); }
void release() { if (atomic_add((__haiku_int32*) &ref, -1) == 1) delete this; }
#else
charT* grab () { if (selfish) return clone (); ++ref; return data (); }