Changeset d40a8ff in mainline


Ignore:
Timestamp:
2007-11-24T14:19:10Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9201f47
Parents:
0cc4313
Message:

Add mode argument to IPC forward.
This argument can be used to modify the way forward behaves.

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/ipc.h

    r0cc4313 rd40a8ff  
    9898#define PHONE_NS        0
    9999
     100/* Forwarding flags. */
     101#define IPC_FF_NONE             0
     102
    100103/* System-specific methods - only through special syscalls
    101104 * These methods have special behaviour
     
    276279extern void ipc_call_static_init(call_t *call);
    277280extern void task_print_list(void);
    278 extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox);
     281extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox,
     282    int mode);
    279283extern void ipc_cleanup(void);
    280284extern int ipc_phone_hangup(phone_t *phone);
  • kernel/generic/include/ipc/sysipc.h

    r0cc4313 rd40a8ff  
    5353    int nonblocking);
    5454unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid,
    55     unative_t method, unative_t arg1);
     55    unative_t method, unative_t arg1, int mode);
    5656unative_t sys_ipc_hangup(int phoneid);
    5757unative_t sys_ipc_register_irq(inr_t inr, devno_t devno, unative_t method,
  • kernel/generic/src/ipc/ipc.c

    r0cc4313 rd40a8ff  
    330330 * @param newphone      Phone structure to target answerbox.
    331331 * @param oldbox        Old answerbox structure.
     332 * @param mode          Flags that specify mode of the forward operation.
    332333 *
    333334 * @return              Return 0 if forwarding succeeded or an error code if
     
    337338 * the original caller is notified automatically with EFORWARD.
    338339 */
    339 int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox)
     340int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, int mode)
    340341{
    341342        spinlock_lock(&oldbox->lock);
  • kernel/generic/src/ipc/sysipc.c

    r0cc4313 rd40a8ff  
    538538 * @param method        New method to use for the forwarded call.
    539539 * @param arg1          New value of the first argument for the forwarded call.
     540 * @param mode          Flags that specify mode of the forward operation.
    540541 *
    541542 * @return              Return 0 on succes, otherwise return an error code.
     
    547548 * new method and argument is not set and these values are ignored.
    548549 *
    549  * Warning: If implementing non-fast version, make sure that
    550  *          ARG3 is not rewritten for certain system IPC
     550 * Warning:     When implementing support for changing additional payload
     551 *              arguments, make sure that ARG3 is not rewritten for certain
     552 *              system IPC
    551553 */
    552554unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid,
    553     unative_t method, unative_t arg1)
     555    unative_t method, unative_t arg1, int mode)
    554556{
    555557        call_t *call;
     
    592594        }
    593595
    594         return ipc_forward(call, phone, &TASK->answerbox);
     596        return ipc_forward(call, phone, &TASK->answerbox, mode);
    595597}
    596598
  • uspace/lib/libc/generic/ipc.c

    r0cc4313 rd40a8ff  
    647647 * @param method        New method for the forwarded call.
    648648 * @param arg1          New value of the first argument for the forwarded call.
     649 * @param mode          Flags specifying mode of the forward operation.
    649650 *
    650651 * @return              Zero on success or an error code.
     
    656657 */
    657658int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method,
    658     ipcarg_t arg1)
    659 {
    660         return __SYSCALL4(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1);
     659    ipcarg_t arg1, int mode)
     660{
     661        return __SYSCALL5(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1,
     662            mode);
    661663}
    662664
  • uspace/lib/libc/include/ipc/ipc.h

    r0cc4313 rd40a8ff  
    259259extern int ipc_unregister_irq(int inr, int devno);
    260260extern int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method,
    261     ipcarg_t arg1);
     261    ipcarg_t arg1, int mode);
    262262extern int ipc_data_send(int phoneid, void *src, size_t size);
    263263extern int ipc_data_receive(ipc_callid_t *callid, void **dst, size_t *size);
  • uspace/srv/devmap/devmap.c

    r0cc4313 rd40a8ff  
    472472        /* FIXME: is this correct method how to pass argument on forwarding ?*/
    473473        ipc_forward_fast(callid, dev->driver->phone, (ipcarg_t)(dev->handle),
    474             0);
     474            0, IPC_FF_NONE);
    475475        return;
    476476}
  • uspace/srv/ns/ns.c

    r0cc4313 rd40a8ff  
    213213        }
    214214        hs = hash_table_get_instance(hlp, hashed_service_t, link);
    215         return ipc_forward_fast(callid, hs->phone, IPC_GET_ARG2(*call), 0);
     215        return ipc_forward_fast(callid, hs->phone, IPC_GET_ARG2(*call), 0,
     216            IPC_FF_NONE);
    216217}
    217218
Note: See TracChangeset for help on using the changeset viewer.