Changeset 2d5a54f3 in mainline for generic/include/ipc/ipc.h


Ignore:
Timestamp:
2006-03-16T00:25:50Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2fb49101
Parents:
c23502d
Message:

Implemented callback IPC call (connect_to_me).

File:
1 edited

Legend:

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

    rc23502d r2d5a54f3  
    6969#define PHONE_NS              0
    7070
     71/* System-specific methods - only through special syscalls
     72 * These methods have special behaviour
     73 */
     74#define IPC_M_IAMCONNECTING   0
     75/** Protocol for CONNECT - TO - ME
     76 *
     77 * Calling process asks the callee to create a callback connection,
     78 * so that it can start initiating new messages.
     79 *
     80 * The protocol for negotiating is as follows:
     81 * - sys_connecttome - sends a message IPC_M_CONNECTTOME
     82 * - sys_wait_for_call - upon receipt tries to allocate new phone
     83 *                       - if it fails, responds with ELIMIT
     84 *                     - passes call to userspace. If userspace
     85 *                       responds with error, phone is deallocated and
     86 *                       error is sent back to caller. Otherwise
     87 *                       the call is accepted and the response is sent back.
     88 *                     - the allocated phoneid is passed to userspace as
     89 *                       ARG3 of the call.
     90 *                     - the caller obtains taskid of the called thread
     91 */
     92#define IPC_M_CONNECTTOME     1
     93#define IPC_M_CONNECTMETO     2
     94
     95
     96/* Well-known methods */
     97#define IPC_M_FIRST_USER      512
     98#define IPC_M_PING            512
     99/* User methods */
     100#define FIRST_USER_METHOD     1024
     101
    71102#ifdef KERNEL
    72103
     
    77108#define IPC_MAX_PHONES  16
    78109
    79 
    80110typedef struct answerbox answerbox_t;
     111typedef __native ipc_data_t[IPC_CALL_LEN];
    81112
    82113typedef struct {
     
    85116        int flags;
    86117        task_t *sender;
    87         __native data[IPC_CALL_LEN];
     118        ipc_data_t data;
    88119} call_t;
    89120
    90121struct answerbox {
    91122        SPINLOCK_DECLARE(lock);
     123
     124        task_t *task;
    92125
    93126        mutex_t mutex;
Note: See TracChangeset for help on using the changeset viewer.