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