Subversion Repositories HelenOS

Rev

Rev 3386 | Rev 4155 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 193... Line 193...
193
 * - ARG1 - source virtual address in the destination address space
193
 * - ARG1 - source virtual address in the destination address space
194
 * - ARG2 - final size of data to be copied
194
 * - ARG2 - final size of data to be copied
195
 */
195
 */
196
#define IPC_M_DATA_READ     7
196
#define IPC_M_DATA_READ     7
197
 
197
 
-
 
198
/** Debug the recipient.
-
 
199
 * - ARG1 - specifies the debug method (from udebug_method_t)
-
 
200
 * - other arguments are specific to the debug method
-
 
201
 */
-
 
202
#define IPC_M_DEBUG_ALL     8
-
 
203
 
198
/* Well-known methods */
204
/* Well-known methods */
199
#define IPC_M_LAST_SYSTEM   511
205
#define IPC_M_LAST_SYSTEM   511
200
#define IPC_M_PING      512
206
#define IPC_M_PING      512
201
/* User methods */
207
/* User methods */
202
#define IPC_FIRST_USER_METHOD   1024
208
#define IPC_FIRST_USER_METHOD   1024
Line 258... Line 264...
258
} answerbox_t;
264
} answerbox_t;
259
 
265
 
260
typedef struct {
266
typedef struct {
261
    unative_t args[IPC_CALL_LEN];
267
    unative_t args[IPC_CALL_LEN];
262
    phone_t *phone;
268
    phone_t *phone;
263
    /*
-
 
264
     * The forward operation can masquerade the caller phone. For those
-
 
265
     * cases, we must keep it aside so that the answer is processed
-
 
266
     * correctly.
-
 
267
     */
-
 
268
    phone_t *caller_phone;
-
 
269
} ipc_data_t;
269
} ipc_data_t;
270
 
270
 
271
typedef struct {
271
typedef struct {
272
    link_t link;
272
    link_t link;
273
 
273
 
Line 285... Line 285...
285
    /** Data passed from/to userspace. */
285
    /** Data passed from/to userspace. */
286
    ipc_data_t data;
286
    ipc_data_t data;
287
 
287
 
288
    /** Buffer for IPC_M_DATA_WRITE and IPC_M_DATA_READ. */
288
    /** Buffer for IPC_M_DATA_WRITE and IPC_M_DATA_READ. */
289
    uint8_t *buffer;
289
    uint8_t *buffer;
-
 
290
 
-
 
291
    /*
-
 
292
     * The forward operation can masquerade the caller phone. For those
-
 
293
     * cases, we must keep it aside so that the answer is processed
-
 
294
     * correctly.
-
 
295
     */
-
 
296
    phone_t *caller_phone;
290
} call_t;
297
} call_t;
291
 
298
 
292
extern void ipc_init(void);
299
extern void ipc_init(void);
293
extern call_t * ipc_wait_for_call(answerbox_t *, uint32_t, int);
300
extern call_t * ipc_wait_for_call(answerbox_t *, uint32_t, int);
294
extern void ipc_answer(answerbox_t *, call_t *);
301
extern void ipc_answer(answerbox_t *, call_t *);
Line 304... Line 311...
304
extern int ipc_forward(call_t *, phone_t *, answerbox_t *, int);
311
extern int ipc_forward(call_t *, phone_t *, answerbox_t *, int);
305
extern void ipc_cleanup(void);
312
extern void ipc_cleanup(void);
306
extern int ipc_phone_hangup(phone_t *);
313
extern int ipc_phone_hangup(phone_t *);
307
extern void ipc_backsend_err(phone_t *, call_t *, unative_t);
314
extern void ipc_backsend_err(phone_t *, call_t *, unative_t);
308
extern void ipc_print_task(task_id_t);
315
extern void ipc_print_task(task_id_t);
-
 
316
extern void ipc_answerbox_slam_phones(answerbox_t *, bool);
-
 
317
extern void ipc_cleanup_call_list(link_t *);
309
 
318
 
310
extern answerbox_t *ipc_phone_0;
319
extern answerbox_t *ipc_phone_0;
311
 
320
 
312
#endif
321
#endif
313
 
322