Subversion Repositories HelenOS

Rev

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

Rev 2927 Rev 3149
Line 70... Line 70...
70
            : "=r" (after_arg)
70
            : "=r" (after_arg)
71
        );
71
        );
72
       
72
       
73
        if (arg != after_arg) {
73
        if (arg != after_arg) {
74
            if (!sh_quiet)
74
            if (!sh_quiet)
75
                printf("General reg tid%llu: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
75
                printf("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg);
76
            atomic_inc(&threads_fault);
76
            atomic_inc(&threads_fault);
77
            break;
77
            break;
78
        }
78
        }
79
    }
79
    }
80
    atomic_inc(&threads_ok);
80
    atomic_inc(&threads_ok);
Line 102... Line 102...
102
            : "=r" (after_arg)
102
            : "=r" (after_arg)
103
        );
103
        );
104
       
104
       
105
        if (arg != after_arg) {
105
        if (arg != after_arg) {
106
            if (!sh_quiet)
106
            if (!sh_quiet)
107
                printf("General reg tid%llu: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
107
                printf("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg);
108
            atomic_inc(&threads_fault);
108
            atomic_inc(&threads_fault);
109
            break;
109
            break;
110
        }
110
        }
111
    }
111
    }
112
    atomic_inc(&threads_ok);
112
    atomic_inc(&threads_ok);
Line 121... Line 121...
121
    waitq_initialize(&can_start);
121
    waitq_initialize(&can_start);
122
    atomic_set(&threads_ok, 0);
122
    atomic_set(&threads_ok, 0);
123
    atomic_set(&threads_fault, 0);
123
    atomic_set(&threads_fault, 0);
124
   
124
   
125
    if (!quiet)
125
    if (!quiet)
126
        printf("Creating %d threads... ", 2 * THREADS);
126
        printf("Creating %u threads... ", 2 * THREADS);
127
 
127
 
128
    for (i = 0; i < THREADS; i++) {
128
    for (i = 0; i < THREADS; i++) {
129
        thread_t *t;
129
        thread_t *t;
130
       
130
       
131
        if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) {
131
        if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) {
132
            if (!quiet)
132
            if (!quiet)
133
                printf("could not create thread %d\n", 2 * i);
133
                printf("could not create thread %u\n", 2 * i);
134
            break;
134
            break;
135
        }
135
        }
136
        thread_ready(t);
136
        thread_ready(t);
137
        total++;
137
        total++;
138
       
138
       
139
        if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) {
139
        if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) {
140
            if (!quiet)
140
            if (!quiet)
141
                printf("could not create thread %d\n", 2 * i + 1);
141
                printf("could not create thread %u\n", 2 * i + 1);
142
            break;
142
            break;
143
        }
143
        }
144
        thread_ready(t);
144
        thread_ready(t);
145
        total++;
145
        total++;
146
    }
146
    }