Changeset 0f4f1b2 in mainline for kernel/test/synch
- Timestamp:
- 2024-01-15T17:10:27Z (2 years ago)
- Branches:
- master
- Children:
- e82879c
- Parents:
- a064d4f
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-15 16:37:22)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-15 17:10:27)
- Location:
- kernel/test/synch
- Files:
-
- 2 edited
-
semaphore1.c (modified) (1 diff)
-
semaphore2.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/semaphore1.c
ra064d4f r0f4f1b2 89 89 thrd = thread_create(consumer, NULL, TASK, 90 90 THREAD_FLAG_NONE, "consumer"); 91 if (thrd) 92 thread_ready(thrd); 93 else 91 if (thrd) { 92 thread_start(thrd); 93 thread_detach(thrd); 94 } else { 94 95 TPRINTF("could not create consumer %d\n", i); 96 } 95 97 } 96 98 for (k = 0; k < (4 - i); k++) { 97 99 thrd = thread_create(producer, NULL, TASK, 98 100 THREAD_FLAG_NONE, "producer"); 99 if (thrd) 100 thread_ready(thrd); 101 else 101 if (thrd) { 102 thread_start(thrd); 103 thread_detach(thrd); 104 } else { 102 105 TPRINTF("could not create producer %d\n", i); 106 } 103 107 } 104 108 } -
kernel/test/synch/semaphore2.c
ra064d4f r0f4f1b2 92 92 thrd = thread_create(consumer, NULL, TASK, 93 93 THREAD_FLAG_NONE, "consumer"); 94 if (thrd) 95 thread_ready(thrd); 96 else 94 if (thrd) { 95 thread_start(thrd); 96 thread_detach(thrd); 97 } else { 97 98 TPRINTF("Error creating thread\n"); 99 } 98 100 } 99 101
Note:
See TracChangeset
for help on using the changeset viewer.
