Subversion Repositories HelenOS-historic

Rev

Rev 1702 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1702 Rev 1780
Line 162... Line 162...
162
#define IPC_MAX_PHONES  16
162
#define IPC_MAX_PHONES  16
163
 
163
 
164
typedef struct answerbox_s answerbox_t;
164
typedef struct answerbox_s answerbox_t;
165
typedef struct phone_s phone_t;
165
typedef struct phone_s phone_t;
166
typedef struct {
166
typedef struct {
167
    __native args[IPC_CALL_LEN];
167
    unative_t args[IPC_CALL_LEN];
168
    phone_t *phone;
168
    phone_t *phone;
169
}ipc_data_t;
169
}ipc_data_t;
170
 
170
 
171
struct answerbox_s {
171
struct answerbox_s {
172
    SPINLOCK_DECLARE(lock);
172
    SPINLOCK_DECLARE(lock);
Line 212... Line 212...
212
    /* The caller box is different from sender->answerbox
212
    /* The caller box is different from sender->answerbox
213
     * for synchronous calls
213
     * for synchronous calls
214
     */
214
     */
215
    answerbox_t *callerbox;
215
    answerbox_t *callerbox;
216
 
216
 
217
    __native private; /**< Private data to internal IPC */
217
    unative_t private; /**< Private data to internal IPC */
218
 
218
 
219
    ipc_data_t data;  /**< Data passed from/to userspace */
219
    ipc_data_t data;  /**< Data passed from/to userspace */
220
}call_t;
220
}call_t;
221
 
221
 
222
extern void ipc_init(void);
222
extern void ipc_init(void);
223
extern call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int flags);
223
extern call_t * ipc_wait_for_call(answerbox_t *box, uint32_t usec, int flags);
224
extern void ipc_answer(answerbox_t *box, call_t *request);
224
extern void ipc_answer(answerbox_t *box, call_t *request);
225
extern int ipc_call(phone_t *phone, call_t *call);
225
extern int ipc_call(phone_t *phone, call_t *call);
226
extern void ipc_call_sync(phone_t *phone, call_t *request);
226
extern void ipc_call_sync(phone_t *phone, call_t *request);
227
extern void ipc_phone_init(phone_t *phone);
227
extern void ipc_phone_init(phone_t *phone);
228
extern void ipc_phone_connect(phone_t *phone, answerbox_t *box);
228
extern void ipc_phone_connect(phone_t *phone, answerbox_t *box);
Line 232... Line 232...
232
extern void ipc_call_static_init(call_t *call);
232
extern void ipc_call_static_init(call_t *call);
233
extern void task_print_list(void);
233
extern void task_print_list(void);
234
extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox);
234
extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox);
235
void ipc_cleanup(void);
235
void ipc_cleanup(void);
236
int ipc_phone_hangup(phone_t *phone);
236
int ipc_phone_hangup(phone_t *phone);
237
extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err);
237
extern void ipc_backsend_err(phone_t *phone, call_t *call, unative_t err);
238
extern void ipc_print_task(task_id_t taskid);
238
extern void ipc_print_task(task_id_t taskid);
239
 
239
 
240
extern answerbox_t *ipc_phone_0;
240
extern answerbox_t *ipc_phone_0;
241
 
241
 
242
#endif
242
#endif