Changeset a35b458 in mainline for kernel/test/atomic/atomic1.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/atomic/atomic1.c
r3061bc1 ra35b458 35 35 { 36 36 atomic_t a; 37 37 38 38 atomic_set(&a, 10); 39 39 if (atomic_get(&a) != 10) 40 40 return "Failed atomic_set()/atomic_get()"; 41 41 42 42 if (atomic_postinc(&a) != 10) 43 43 return "Failed atomic_postinc()"; 44 44 if (atomic_get(&a) != 11) 45 45 return "Failed atomic_get() after atomic_postinc()"; 46 46 47 47 if (atomic_postdec(&a) != 11) 48 48 return "Failed atomic_postdec()"; 49 49 if (atomic_get(&a) != 10) 50 50 return "Failed atomic_get() after atomic_postdec()"; 51 51 52 52 if (atomic_preinc(&a) != 11) 53 53 return "Failed atomic_preinc()"; 54 54 if (atomic_get(&a) != 11) 55 55 return "Failed atomic_get() after atomic_preinc()"; 56 56 57 57 if (atomic_predec(&a) != 10) 58 58 return "Failed atomic_predec()"; 59 59 if (atomic_get(&a) != 10) 60 60 return "Failed atomic_get() after atomic_predec()"; 61 61 62 62 return NULL; 63 63 }
Note:
See TracChangeset
for help on using the changeset viewer.