Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/absl/base/internal/spinlock_akaros.inc is written in an unsupported language. File is not indexed.

0001 // Copyright 2017 The Abseil Authors.
0002 //
0003 // Licensed under the Apache License, Version 2.0 (the "License");
0004 // you may not use this file except in compliance with the License.
0005 // You may obtain a copy of the License at
0006 //
0007 //      https://www.apache.org/licenses/LICENSE-2.0
0008 //
0009 // Unless required by applicable law or agreed to in writing, software
0010 // distributed under the License is distributed on an "AS IS" BASIS,
0011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0012 // See the License for the specific language governing permissions and
0013 // limitations under the License.
0014 //
0015 // This file is an Akaros-specific part of spinlock_wait.cc
0016 
0017 #include <atomic>
0018 
0019 #include "absl/base/internal/scheduling_mode.h"
0020 
0021 extern "C" {
0022 
0023 ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)(
0024     std::atomic<uint32_t>* /* lock_word */, uint32_t /* value */,
0025     int /* loop */, absl::base_internal::SchedulingMode /* mode */) {
0026   // In Akaros, one must take care not to call anything that could cause a
0027   // malloc(), a blocking system call, or a uthread_yield() while holding a
0028   // spinlock. Our callers assume will not call into libraries or other
0029   // arbitrary code.
0030 }
0031 
0032 ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)(
0033     std::atomic<uint32_t>* /* lock_word */, bool /* all */) {}
0034 
0035 }  // extern "C"