X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fsvm%2Fsvm_fifo.h;h=4a119341d8b3cb3a519e360c4ab6c56331e86e26;hb=c5df8c71c;hp=6c3940dfad5bd91e54c726f330e44139e3010ebb;hpb=4b76112dc43b775abd3deb2d9f65458ca08424ee;p=vpp.git diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h index 6c3940dfad5..4a119341d8b 100644 --- a/src/svm/svm_fifo.h +++ b/src/svm/svm_fifo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco and/or its affiliates. + * Copyright (c) 2016-2019 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -173,7 +173,7 @@ svm_fifo_set_event (svm_fifo_t * f) { /* return __sync_lock_test_and_set (&f->has_event, 1) == 0; return __sync_bool_compare_and_swap (&f->has_event, 0, 1); */ - return !__atomic_exchange_n (&f->has_event, 1, __ATOMIC_RELEASE); + return !clib_atomic_swap_rel_n (&f->has_event, 1); } /** @@ -184,7 +184,7 @@ svm_fifo_set_event (svm_fifo_t * f) always_inline void svm_fifo_unset_event (svm_fifo_t * f) { - __atomic_exchange_n (&f->has_event, 0, __ATOMIC_ACQUIRE); + clib_atomic_swap_acq_n (&f->has_event, 0); } svm_fifo_t *svm_fifo_create (u32 data_size_in_bytes);