Changeset d40a8ff in mainline for kernel


Ignore:
Timestamp:
2007-11-24T14:19:10Z (18 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.

Location:
kernel/generic
Files:
4 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
Note: See TracChangeset for help on using the changeset viewer.