Changes in kernel/test/atomic/atomic1.c [a35b458:e3306d04] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/atomic/atomic1.c
ra35b458 re3306d04 36 36 atomic_t a; 37 37 38 atomic_s et(&a, 10);39 if (atomic_ get(&a) != 10)40 return "Failed atomic_s et()/atomic_get()";38 atomic_store(&a, 10); 39 if (atomic_load(&a) != 10) 40 return "Failed atomic_store()/atomic_load()"; 41 41 42 42 if (atomic_postinc(&a) != 10) 43 43 return "Failed atomic_postinc()"; 44 if (atomic_ get(&a) != 11)45 return "Failed atomic_ get() after atomic_postinc()";44 if (atomic_load(&a) != 11) 45 return "Failed atomic_load() after atomic_postinc()"; 46 46 47 47 if (atomic_postdec(&a) != 11) 48 48 return "Failed atomic_postdec()"; 49 if (atomic_ get(&a) != 10)50 return "Failed atomic_ get() after atomic_postdec()";49 if (atomic_load(&a) != 10) 50 return "Failed atomic_load() after atomic_postdec()"; 51 51 52 52 if (atomic_preinc(&a) != 11) 53 53 return "Failed atomic_preinc()"; 54 if (atomic_ get(&a) != 11)55 return "Failed atomic_ get() after atomic_preinc()";54 if (atomic_load(&a) != 11) 55 return "Failed atomic_load() after atomic_preinc()"; 56 56 57 57 if (atomic_predec(&a) != 10) 58 58 return "Failed atomic_predec()"; 59 if (atomic_ get(&a) != 10)60 return "Failed atomic_ get() after atomic_predec()";59 if (atomic_load(&a) != 10) 60 return "Failed atomic_load() after atomic_predec()"; 61 61 62 62 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.