Subversion Repositories HelenOS

Rev

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

Rev 2807 Rev 2808
Line 436... Line 436...
436
    buf_size = IPC_GET_ARG2(call->data);
436
    buf_size = IPC_GET_ARG2(call->data);
437
 
437
 
438
    copied = total = 0;
438
    copied = total = 0;
439
    for (cur = ta->th_head.next; cur != &ta->th_head; cur = cur->next) {
439
    for (cur = ta->th_head.next; cur != &ta->th_head; cur = cur->next) {
440
        t = list_get_instance(cur, thread_t, th_link);
440
        t = list_get_instance(cur, thread_t, th_link);
-
 
441
 
-
 
442
        /* Not interested in kernel threads */
-
 
443
        if ((t->flags & THREAD_FLAG_USPACE) == 0)
-
 
444
            continue;
441
       
445
 
442
        //FIXME: id cropped!!
446
        //FIXME: id cropped!!
443
        tid = (unative_t) t->tid;
447
        tid = (unative_t) t->tid;
444
 
448
 
445
        to_copy = sizeof(unative_t);
449
        to_copy = sizeof(unative_t);
446
        if (copied + to_copy >= buf_size)
450
        if (copied + to_copy >= buf_size)
Line 1071... Line 1075...
1071
/**
1075
/**
1072
 * Syscall connect to a task by id.
1076
 * Syscall connect to a task by id.
1073
 *
1077
 *
1074
 * @return      Phone id on success, or negative error code.
1078
 * @return      Phone id on success, or negative error code.
1075
 */
1079
 */
1076
unative_t sys_ipc_connect_task(sysarg64_t *uspace_taskid_arg)
1080
unative_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg)
1077
{
1081
{
1078
    sysarg64_t taskid_arg;
1082
    sysarg64_t taskid_arg;
1079
    int rc;
1083
    int rc;
1080
   
1084
   
1081
    rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t));
1085
    rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t));
1082
    if (rc != 0)
1086
    if (rc != 0)
1083
        return (unative_t) rc;
1087
        return (unative_t) rc;
1084
 
1088
 
1085
    klog_printf("sys_ipc_connect_kbox(%lld, %d)", taskid_arg.value);
1089
    klog_printf("sys_ipc_connect_kbox(%lld, %d)", taskid_arg.value);
1086
 
1090
 
1087
    return ipc_connect_task(taskid_arg.value);
1091
    return ipc_connect_kbox(taskid_arg.value);
1088
}
1092
}
1089
 
1093
 
1090
/** @}
1094
/** @}
1091
 */
1095
 */