Subversion Repositories HelenOS

Rev

Rev 2028 | Rev 2050 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2028 Rev 2042
Line 85... Line 85...
85
 
85
 
86
        printf("Creating %ld readers and %ld writers...", readers, writers);
86
        printf("Creating %ld readers and %ld writers...", readers, writers);
87
       
87
       
88
        for (j = 0; j < (READERS + WRITERS) / 2; j++) {
88
        for (j = 0; j < (READERS + WRITERS) / 2; j++) {
89
            for (k = 0; k < i; k++) {
89
            for (k = 0; k < i; k++) {
90
                thrd = thread_create(reader, NULL, TASK, 0, "reader");
90
                thrd = thread_create(reader, NULL, TASK, 0, "reader", false);
91
                if (thrd)
91
                if (thrd)
92
                    thread_ready(thrd);
92
                    thread_ready(thrd);
93
                else
93
                else
94
                    printf("Could not create reader %d\n", k);
94
                    printf("Could not create reader %d\n", k);
95
            }
95
            }
96
            for (k = 0; k < (4 - i); k++) {
96
            for (k = 0; k < (4 - i); k++) {
97
                thrd = thread_create(writer, NULL, TASK, 0, "writer");
97
                thrd = thread_create(writer, NULL, TASK, 0, "writer", false);
98
                if (thrd)
98
                if (thrd)
99
                    thread_ready(thrd);
99
                    thread_ready(thrd);
100
                else
100
                else
101
                    printf("Could not create writer %d\n", k);
101
                    printf("Could not create writer %d\n", k);
102
            }
102
            }