Changeset 569a51a in mainline for uspace/lib/c


Ignore:
Timestamp:
2017-12-08T21:17:27Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0016674
Parents:
071a1ddb
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-07 16:35:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:17:27)
Message:

Return phone handle in SYS_IPC_CONNECT_KBOX separately from error code.

Location:
uspace/lib/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async.c

    r071a1ddb r569a51a  
    23982398        }
    23992399       
    2400         int phone = ipc_connect_kbox(id);
    2401         if (phone < 0) {
    2402                 errno = phone;
     2400        cap_handle_t phone;
     2401        int rc = ipc_connect_kbox(id, &phone);
     2402        if (rc != EOK) {
     2403                errno = rc;
    24032404                free(sess);
    24042405                return NULL;
  • uspace/lib/c/generic/ipc.c

    r071a1ddb r569a51a  
    377377 *
    378378 */
    379 int ipc_connect_kbox(task_id_t id)
     379int ipc_connect_kbox(task_id_t id, cap_handle_t *phone)
    380380{
    381381#ifdef __32_BITS__
    382382        sysarg64_t arg = (sysarg64_t) id;
    383         return __SYSCALL1(SYS_IPC_CONNECT_KBOX, (sysarg_t) &arg);
     383        return __SYSCALL2(SYS_IPC_CONNECT_KBOX, (sysarg_t) &arg, (sysarg_t) phone);
    384384#endif
    385        
    386385#ifdef __64_BITS__
    387         return __SYSCALL1(SYS_IPC_CONNECT_KBOX, (sysarg_t) id);
     386        return __SYSCALL2(SYS_IPC_CONNECT_KBOX, (sysarg_t) id, (sysarg_t) phone);
    388387#endif
    389388}
  • uspace/lib/c/include/ipc/ipc.h

    r071a1ddb r569a51a  
    122122    sysarg_t, sysarg_t, sysarg_t, sysarg_t, unsigned int);
    123123
    124 extern int ipc_connect_kbox(task_id_t);
     124extern int ipc_connect_kbox(task_id_t, cap_handle_t *);
    125125
    126126#endif
Note: See TracChangeset for help on using the changeset viewer.