This commit is contained in:
Mylloon 2024-04-23 13:09:35 +02:00
parent 4876b592d4
commit 6f0cc916c6
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 2 additions and 2 deletions

View file

@ -79,7 +79,7 @@ sched_init(int nthreads, int qlen, taskfunc f, void *closure)
pthread_t threads[nthreads]; pthread_t threads[nthreads];
for(int i = 0; i < nthreads; ++i) { for(int i = 0; i < nthreads; ++i) {
if(pthread_create(&threads[i], NULL, sched_worker, &sched) != 0) { if(pthread_create(&threads[i], NULL, sched_worker, &sched) != 0) {
fprintf(stderr, "Can't create the thread %d\n", i); fprintf(stderr, "Can't create the thread %d", i);
if(i > 0) { if(i > 0) {
fprintf(stderr, ", cancelling already created threads...\n"); fprintf(stderr, ", cancelling already created threads...\n");

View file

@ -76,7 +76,7 @@ sched_init(int nthreads, int qlen, taskfunc f, void *closure)
pthread_t threads[nthreads]; pthread_t threads[nthreads];
for(int i = 0; i < nthreads; ++i) { for(int i = 0; i < nthreads; ++i) {
if(pthread_create(&threads[i], NULL, sched_worker, &sched) != 0) { if(pthread_create(&threads[i], NULL, sched_worker, &sched) != 0) {
fprintf(stderr, "Can't create the thread %d\n", i); fprintf(stderr, "Can't create the thread %d", i);
if(i > 0) { if(i > 0) {
fprintf(stderr, ", cancelling already created threads...\n"); fprintf(stderr, ", cancelling already created threads...\n");