/trunk/kernel/generic/include/ipc/sysipc.h |
---|
52,7 → 52,7 |
unative_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec, |
int nonblocking); |
unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid, |
unative_t method, unative_t arg1); |
unative_t method, unative_t arg1, int mode); |
unative_t sys_ipc_hangup(int phoneid); |
unative_t sys_ipc_register_irq(inr_t inr, devno_t devno, unative_t method, |
irq_code_t *ucode); |
/trunk/kernel/generic/include/ipc/ipc.h |
---|
97,6 → 97,9 |
/* Well known phone descriptors */ |
#define PHONE_NS 0 |
/* Forwarding flags. */ |
#define IPC_FF_NONE 0 |
/* System-specific methods - only through special syscalls |
* These methods have special behaviour |
*/ |
275,7 → 278,8 |
extern void ipc_answerbox_init(answerbox_t *box); |
extern void ipc_call_static_init(call_t *call); |
extern void task_print_list(void); |
extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox); |
extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, |
int mode); |
extern void ipc_cleanup(void); |
extern int ipc_phone_hangup(phone_t *phone); |
extern void ipc_backsend_err(phone_t *phone, call_t *call, unative_t err); |
/trunk/kernel/generic/src/ipc/sysipc.c |
---|
537,6 → 537,7 |
* @param phoneid Phone handle to use for forwarding. |
* @param method New method to use for the forwarded call. |
* @param arg1 New value of the first argument for the forwarded call. |
* @param mode Flags that specify mode of the forward operation. |
* |
* @return Return 0 on succes, otherwise return an error code. |
* |
546,11 → 547,12 |
* respectively. Also note there is a set of immutable methods, for which the |
* new method and argument is not set and these values are ignored. |
* |
* Warning: If implementing non-fast version, make sure that |
* ARG3 is not rewritten for certain system IPC |
* Warning: When implementing support for changing additional payload |
* arguments, make sure that ARG3 is not rewritten for certain |
* system IPC |
*/ |
unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid, |
unative_t method, unative_t arg1) |
unative_t method, unative_t arg1, int mode) |
{ |
call_t *call; |
phone_t *phone; |
591,7 → 593,7 |
} |
} |
return ipc_forward(call, phone, &TASK->answerbox); |
return ipc_forward(call, phone, &TASK->answerbox, mode); |
} |
/** Answer an IPC call - fast version. |
/trunk/kernel/generic/src/ipc/ipc.c |
---|
329,6 → 329,7 |
* @param call Call structure to be redirected. |
* @param newphone Phone structure to target answerbox. |
* @param oldbox Old answerbox structure. |
* @param mode Flags that specify mode of the forward operation. |
* |
* @return Return 0 if forwarding succeeded or an error code if |
* there was error. |
336,7 → 337,7 |
* The return value serves only as an information for the forwarder, |
* the original caller is notified automatically with EFORWARD. |
*/ |
int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox) |
int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, int mode) |
{ |
spinlock_lock(&oldbox->lock); |
list_remove(&call->link); |
/trunk/uspace/lib/libc/include/ipc/ipc.h |
---|
258,7 → 258,7 |
extern int ipc_register_irq(int inr, int devno, int method, irq_code_t *code); |
extern int ipc_unregister_irq(int inr, int devno); |
extern int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method, |
ipcarg_t arg1); |
ipcarg_t arg1, int mode); |
extern int ipc_data_send(int phoneid, void *src, size_t size); |
extern int ipc_data_receive(ipc_callid_t *callid, void **dst, size_t *size); |
extern ipcarg_t ipc_data_deliver(ipc_callid_t callid, void *dst, size_t size); |
/trunk/uspace/lib/libc/generic/ipc.c |
---|
646,6 → 646,7 |
* @param phoneid Phone handle to use for forwarding. |
* @param method New method for the forwarded call. |
* @param arg1 New value of the first argument for the forwarded call. |
* @param mode Flags specifying mode of the forward operation. |
* |
* @return Zero on success or an error code. |
* |
655,9 → 656,10 |
* verbatim. |
*/ |
int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method, |
ipcarg_t arg1) |
ipcarg_t arg1, int mode) |
{ |
return __SYSCALL4(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1); |
return __SYSCALL5(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1, |
mode); |
} |
/** Wrapper for making IPC_M_DATA_SEND calls. |
/trunk/uspace/srv/ns/ns.c |
---|
212,7 → 212,8 |
return ENOENT; |
} |
hs = hash_table_get_instance(hlp, hashed_service_t, link); |
return ipc_forward_fast(callid, hs->phone, IPC_GET_ARG2(*call), 0); |
return ipc_forward_fast(callid, hs->phone, IPC_GET_ARG2(*call), 0, |
IPC_FF_NONE); |
} |
/** Compute hash index into NS hash table. |
/trunk/uspace/srv/devmap/devmap.c |
---|
471,7 → 471,7 |
/* FIXME: is this correct method how to pass argument on forwarding ?*/ |
ipc_forward_fast(callid, dev->driver->phone, (ipcarg_t)(dev->handle), |
0); |
0, IPC_FF_NONE); |
return; |
} |