Skip to content

Commit

Permalink
Fix typos in compiler-rt/lib/builtins/atomic.c
Browse files Browse the repository at this point in the history
Summary:
This patch fixes typos in file compiler-rt/lib/builtins/atomic.c.

Reviewers: jasonliu, hubert.reinterpretcast, jfb

Reviewed By: jfb

Subscribers: t.p.northover, theraven, dberris, jfb, jdoerfert, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D59228

Patch by Xing Xue.

llvm-svn: 356844
  • Loading branch information
hubert-reinterpretcast committed Mar 23, 2019
1 parent a7510ba commit 4e7a218
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion compiler-rt/lib/builtins/atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,32 @@ static __inline Lock *lock_for_pointer(void *ptr) {
#define LOCK_FREE_CASES() \
do {\
switch (size) {\
case 1:\
if (IS_LOCK_FREE_1) {\
LOCK_FREE_ACTION(uint8_t);\
}\
break; \
case 2:\
if (IS_LOCK_FREE_2) {\
LOCK_FREE_ACTION(uint16_t);\
}\
break; \
case 4:\
if (IS_LOCK_FREE_4) {\
LOCK_FREE_ACTION(uint32_t);\
}\
break; \
case 8:\
if (IS_LOCK_FREE_8) {\
LOCK_FREE_ACTION(uint64_t);\
}\
break; \
case 16:\
if (IS_LOCK_FREE_16) {\
/* FIXME: __uint128_t isn't available on 32 bit platforms.
LOCK_FREE_ACTION(__uint128_t);*/\
}\
break; \
}\
} while (0)

Expand All @@ -174,7 +183,7 @@ void __atomic_load_c(int size, void *src, void *dest, int model) {
/// pointer only.
void __atomic_store_c(int size, void *dest, void *src, int model) {
#define LOCK_FREE_ACTION(type) \
__c11_atomic_store((_Atomic(type)*)dest, *(type*)dest, model);\
__c11_atomic_store((_Atomic(type)*)dest, *(type*)src, model);\
return;
LOCK_FREE_CASES();
#undef LOCK_FREE_ACTION
Expand Down

0 comments on commit 4e7a218

Please sign in to comment.