summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/atomic.c
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-04-28 22:47:49 +0000
committerPetr Hosek <phosek@chromium.org>2019-04-28 22:47:49 +0000
commit0ba22f51d128bee9d69756c56c4678097270e10b (patch)
tree75aa9d20dd483e2eb23ccdcf520e18754e86065c /compiler-rt/lib/builtins/atomic.c
parent082b89b25faae3e45a023caf51b65ca0f02f377f (diff)
downloadbcm5719-llvm-0ba22f51d128bee9d69756c56c4678097270e10b.tar.gz
bcm5719-llvm-0ba22f51d128bee9d69756c56c4678097270e10b.zip
[builtins] Use single line C++/C99 comment style
Use the uniform single line C++/99 style for code comments. This is part of the cleanup proposed in "[RFC] compiler-rt builtins cleanup and refactoring". Differential Revision: https://reviews.llvm.org/D60352 llvm-svn: 359411
Diffstat (limited to 'compiler-rt/lib/builtins/atomic.c')
-rw-r--r--compiler-rt/lib/builtins/atomic.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/compiler-rt/lib/builtins/atomic.c b/compiler-rt/lib/builtins/atomic.c
index b273f0c4c10..0f82803a641 100644
--- a/compiler-rt/lib/builtins/atomic.c
+++ b/compiler-rt/lib/builtins/atomic.c
@@ -1,28 +1,27 @@
-/*===-- atomic.c - Implement support functions for atomic operations.------===
- *
- * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
- * See https://llvm.org/LICENSE.txt for license information.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- *
- *===----------------------------------------------------------------------===
- *
- * atomic.c defines a set of functions for performing atomic accesses on
- * arbitrary-sized memory locations. This design uses locks that should
- * be fast in the uncontended case, for two reasons:
- *
- * 1) This code must work with C programs that do not link to anything
- * (including pthreads) and so it should not depend on any pthread
- * functions.
- * 2) Atomic operations, rather than explicit mutexes, are most commonly used
- * on code where contended operations are rate.
- *
- * To avoid needing a per-object lock, this code allocates an array of
- * locks and hashes the object pointers to find the one that it should use.
- * For operations that must be atomic on two locations, the lower lock is
- * always acquired first, to avoid deadlock.
- *
- *===----------------------------------------------------------------------===
- */
+//===-- atomic.c - Implement support functions for atomic operations.------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// atomic.c defines a set of functions for performing atomic accesses on
+// arbitrary-sized memory locations. This design uses locks that should
+// be fast in the uncontended case, for two reasons:
+//
+// 1) This code must work with C programs that do not link to anything
+// (including pthreads) and so it should not depend on any pthread
+// functions.
+// 2) Atomic operations, rather than explicit mutexes, are most commonly used
+// on code where contended operations are rate.
+//
+// To avoid needing a per-object lock, this code allocates an array of
+// locks and hashes the object pointers to find the one that it should use.
+// For operations that must be atomic on two locations, the lower lock is
+// always acquired first, to avoid deadlock.
+//
+//===----------------------------------------------------------------------===//
#include <stdint.h>
#include <string.h>
OpenPOWER on IntegriCloud