Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/sysipc.c

    ra53ed3a rcde999a  
    158158 *
    159159 */
    160 errno_t answer_preprocess(call_t *answer, ipc_data_t *olddata)
    161 {
    162         errno_t rc = EOK;
     160int answer_preprocess(call_t *answer, ipc_data_t *olddata)
     161{
     162        int rc = EOK;
    163163
    164164        spinlock_lock(&answer->forget_lock);
     
    194194        spinlock_unlock(&answer->forget_lock);
    195195
    196         if ((errno_t) IPC_GET_RETVAL(answer->data) == EHANGUP) {
     196        if ((int) IPC_GET_RETVAL(answer->data) == EHANGUP) {
    197197                phone_t *phone = answer->caller_phone;
    198198                mutex_lock(&phone->lock);
     
    222222 *
    223223 */
    224 static errno_t request_preprocess(call_t *call, phone_t *phone)
     224static int request_preprocess(call_t *call, phone_t *phone)
    225225{
    226226        call->request_method = IPC_GET_IMETHOD(call->data);
     
    239239static void process_answer(call_t *call)
    240240{
    241         if (((errno_t) IPC_GET_RETVAL(call->data) == EHANGUP) &&
     241        if (((int) IPC_GET_RETVAL(call->data) == EHANGUP) &&
    242242            (call->flags & IPC_CALL_FORWARDED))
    243243                IPC_SET_RETVAL(call->data, EFORWARD);
     
    271271 *
    272272 */
    273 errno_t ipc_req_internal(cap_handle_t handle, ipc_data_t *data, sysarg_t priv)
     273int ipc_req_internal(cap_handle_t handle, ipc_data_t *data, sysarg_t priv)
    274274{
    275275        kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     
    281281        memcpy(call->data.args, data->args, sizeof(data->args));
    282282       
    283         errno_t rc = request_preprocess(call, kobj->phone);
     283        int rc = request_preprocess(call, kobj->phone);
    284284        if (!rc) {
    285285#ifdef CONFIG_UDEBUG
     
    362362 *
    363363 */
    364 sys_errno_t sys_ipc_call_async_fast(sysarg_t handle, sysarg_t imethod,
     364sysarg_t sys_ipc_call_async_fast(sysarg_t handle, sysarg_t imethod,
    365365    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t label)
    366366{
     
    389389        call->data.label = label;
    390390       
    391         errno_t res = request_preprocess(call, kobj->phone);
     391        int res = request_preprocess(call, kobj->phone);
    392392       
    393393        if (!res)
     
    409409 *
    410410 */
    411 sys_errno_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data,
     411sysarg_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data,
    412412    sysarg_t label)
    413413{
     
    422422
    423423        call_t *call = ipc_call_alloc(0);
    424         errno_t rc = copy_from_uspace(&call->data.args, &data->args,
     424        int rc = copy_from_uspace(&call->data.args, &data->args,
    425425            sizeof(call->data.args));
    426         if (rc != EOK) {
     426        if (rc != 0) {
    427427                kobject_put(call->kobject);
    428428                kobject_put(kobj);
    429                 return (sys_errno_t) rc;
     429                return (sysarg_t) rc;
    430430        }
    431431
     
    433433        call->data.label = label;
    434434       
    435         errno_t res = request_preprocess(call, kobj->phone);
     435        int res = request_preprocess(call, kobj->phone);
    436436       
    437437        if (!res)
     
    466466 *
    467467 */
    468 static sys_errno_t sys_ipc_forward_common(sysarg_t chandle, sysarg_t phandle,
     468static sysarg_t sys_ipc_forward_common(sysarg_t chandle, sysarg_t phandle,
    469469    sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
    470470    sysarg_t arg4, sysarg_t arg5, unsigned int mode, bool slow)
     
    482482       
    483483        bool after_forward = false;
    484         errno_t rc;
     484        int rc;
    485485
    486486        kobject_t *pkobj = kobject_get(TASK, phandle, KOBJECT_TYPE_PHONE);
     
    577577 *
    578578 */
    579 sys_errno_t sys_ipc_forward_fast(sysarg_t chandle, sysarg_t phandle,
     579sysarg_t sys_ipc_forward_fast(sysarg_t chandle, sysarg_t phandle,
    580580    sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, unsigned int mode)
    581581{
     
    601601 *
    602602 */
    603 sys_errno_t sys_ipc_forward_slow(sysarg_t chandle, sysarg_t phandle,
     603sysarg_t sys_ipc_forward_slow(sysarg_t chandle, sysarg_t phandle,
    604604    ipc_data_t *data, unsigned int mode)
    605605{
    606606        ipc_data_t newdata;
    607         errno_t rc = copy_from_uspace(&newdata.args, &data->args,
     607        int rc = copy_from_uspace(&newdata.args, &data->args,
    608608            sizeof(newdata.args));
    609         if (rc != EOK)
    610                 return (sys_errno_t) rc;
     609        if (rc != 0)
     610                return (sysarg_t) rc;
    611611       
    612612        return sys_ipc_forward_common(chandle, phandle,
     
    631631 *
    632632 */
    633 sys_errno_t sys_ipc_answer_fast(sysarg_t chandle, sysarg_t retval, sysarg_t arg1,
     633sysarg_t sys_ipc_answer_fast(sysarg_t chandle, sysarg_t retval, sysarg_t arg1,
    634634    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
    635635{
     
    660660         */
    661661        IPC_SET_ARG5(call->data, 0);
    662         errno_t rc = answer_preprocess(call, saved ? &saved_data : NULL);
     662        int rc = answer_preprocess(call, saved ? &saved_data : NULL);
    663663       
    664664        ipc_answer(&TASK->answerbox, call);
     
    678678 *
    679679 */
    680 sys_errno_t sys_ipc_answer_slow(sysarg_t chandle, ipc_data_t *data)
     680sysarg_t sys_ipc_answer_slow(sysarg_t chandle, ipc_data_t *data)
    681681{
    682682        kobject_t *kobj = cap_unpublish(TASK, chandle, KOBJECT_TYPE_CALL);
     
    695695                saved = false;
    696696       
    697         errno_t rc = copy_from_uspace(&call->data.args, &data->args,
     697        int rc = copy_from_uspace(&call->data.args, &data->args,
    698698            sizeof(call->data.args));
    699         if (rc != EOK) {
     699        if (rc != 0) {
    700700                /*
    701701                 * Republish the capability so that the call does not get lost.
     
    722722 *
    723723 */
    724 sys_errno_t sys_ipc_hangup(sysarg_t handle)
     724sysarg_t sys_ipc_hangup(sysarg_t handle)
    725725{
    726726        kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     
    728728                return ENOENT;
    729729       
    730         errno_t rc = ipc_phone_hangup(kobj->phone);
     730        int rc = ipc_phone_hangup(kobj->phone);
    731731        kobject_put(kobj);
    732732        return rc;
     
    742742 * @return An error code on error.
    743743 */
    744 sys_errno_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec,
     744sysarg_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec,
    745745    unsigned int flags)
    746746{
     
    800800       
    801801        cap_handle_t handle;
    802         errno_t rc = cap_alloc(TASK, &handle);
     802        int rc = cap_alloc(TASK, &handle);
    803803        if (rc != EOK) {
    804804                goto error;
     
    848848 *
    849849 */
    850 sys_errno_t sys_ipc_poke(void)
     850sysarg_t sys_ipc_poke(void)
    851851{
    852852        waitq_unsleep(&TASK->answerbox.wq);
     
    866866 *
    867867 */
    868 sys_errno_t sys_ipc_irq_subscribe(inr_t inr, sysarg_t imethod, irq_code_t *ucode,
     868sysarg_t sys_ipc_irq_subscribe(inr_t inr, sysarg_t imethod, irq_code_t *ucode,
    869869        cap_handle_t *uspace_handle)
    870870{
     
    883883 *
    884884 */
    885 sys_errno_t sys_ipc_irq_unsubscribe(sysarg_t cap)
     885sysarg_t sys_ipc_irq_unsubscribe(sysarg_t cap)
    886886{
    887887        if (!(perm_get(TASK) & PERM_IRQ_REG))
     
    898898 *
    899899 */
    900 sys_errno_t sys_ipc_connect_kbox(task_id_t *uspace_taskid, cap_handle_t *uspace_phone)
     900sysarg_t sys_ipc_connect_kbox(task_id_t *uspace_taskid, cap_handle_t *uspace_phone)
    901901{
    902902#ifdef CONFIG_UDEBUG
     
    904904        cap_handle_t phone;
    905905       
    906         errno_t rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(task_id_t));
     906        int rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(task_id_t));
    907907        if (rc == EOK) {
    908908                rc = ipc_connect_kbox((task_id_t) taskid, &phone);
     
    917917        }
    918918       
    919         return (sys_errno_t) rc;
     919        return (sysarg_t) rc;
    920920#else
    921         return (sys_errno_t) ENOTSUP;
     921        return (sysarg_t) ENOTSUP;
    922922#endif
    923923}
Note: See TracChangeset for help on using the changeset viewer.