Subversion Repositories HelenOS

Rev

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

Rev 2853 Rev 2854
Line 21... Line 21...
21
unsigned n_threads;
21
unsigned n_threads;
22
 
22
 
23
int phoneid;
23
int phoneid;
24
int abort_trace;
24
int abort_trace;
25
 
25
 
-
 
26
volatile int print_cs;
-
 
27
 
-
 
28
void fcs_begin(volatile int *csvar)
-
 
29
{
-
 
30
    while (*csvar != 0) {
-
 
31
        fibril_yield();
-
 
32
        printf(" \b");
-
 
33
    }
-
 
34
 
-
 
35
    *csvar = 1;
-
 
36
}
-
 
37
 
-
 
38
void fcs_end(volatile int *csvar)
-
 
39
{
-
 
40
    *csvar = 0;
-
 
41
}
-
 
42
 
26
int task_connect(int taskid)
43
int task_connect(int taskid)
27
{
44
{
28
    int rc;
45
    int rc;
29
 
46
 
30
    printf("ipc_connect_task(%d)...\n", taskid);
47
    printf("ipc_connect_task(%d)...\n", taskid);
Line 150... Line 167...
150
        if (rc >= 0) {
167
        if (rc >= 0) {
151
            rc = debug_args_read(phoneid, threadid_buf[thread_idx],
168
            rc = debug_args_read(phoneid, threadid_buf[thread_idx],
152
                sc_args);
169
                sc_args);
153
        }
170
        }
154
 
171
 
-
 
172
//      printf("[%d]:begin\n", thread_idx);
-
 
173
        fcs_begin(&print_cs);
-
 
174
//      printf("[%d]:inside\n", thread_idx);
-
 
175
 
155
        printf("[%d] ", thread_idx);
176
        printf("[%d] ", thread_idx);
156
 
177
 
157
        /* Print syscall name, id and arguments */
178
        /* Print syscall name, id and arguments */
158
        if (rc >= 0) {
179
        if (rc >= 0) {
159
            printf("%s", syscall_desc[sc_id].name);
180
            printf("%s", syscall_desc[sc_id].name);
160
            print_sc_args(sc_args, syscall_desc[sc_id].n_args);
181
            print_sc_args(sc_args, syscall_desc[sc_id].n_args);
161
            rv_type = syscall_desc[sc_id].rv_type;
182
            rv_type = syscall_desc[sc_id].rv_type;
162
            print_sc_retval(sc_rc, rv_type);
183
            print_sc_retval(sc_rc, rv_type);
163
        }
184
        }
164
 
185
 
-
 
186
//      printf("[%d]:end\n", thread_idx);
-
 
187
        fcs_end(&print_cs);
-
 
188
 
165
        switch (sc_id) {
189
        switch (sc_id) {
166
        case SYS_IPC_CALL_ASYNC_SLOW:
190
        case SYS_IPC_CALL_ASYNC_SLOW:
167
            sc_ipc_call_async_slow(sc_args);
191
            sc_ipc_call_async_slow(sc_args);
168
            break;
192
            break;
169
        default:
193
        default:
Line 223... Line 247...
223
    return;
247
    return;
224
}
248
}
225
 
249
 
226
int main(void)
250
int main(void)
227
{
251
{
-
 
252
    print_cs = 0;
-
 
253
 
228
    while (1) {
254
    while (1) {
229
        trace_active_task();
255
        trace_active_task();
230
    }
256
    }
231
}
257
}
232
 
258