Subversion Repositories HelenOS

Rev

Rev 4581 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4581 Rev 4718
Line 44... Line 44...
44
typedef ipc_callid_t aid_t;
44
typedef ipc_callid_t aid_t;
45
typedef void (*async_client_conn_t)(ipc_callid_t callid, ipc_call_t *call);
45
typedef void (*async_client_conn_t)(ipc_callid_t callid, ipc_call_t *call);
46
 
46
 
47
extern atomic_t async_futex;
47
extern atomic_t async_futex;
48
 
48
 
49
static inline void async_manager(void)
49
extern int __async_init(void);
50
{
-
 
51
    fibril_switch(FIBRIL_TO_MANAGER);
-
 
52
}
-
 
53
 
-
 
54
extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs);
50
extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs);
55
 
51
 
56
static inline ipc_callid_t async_get_call(ipc_call_t *data)
52
static inline ipc_callid_t async_get_call(ipc_call_t *data)
57
{
53
{
58
    return async_get_call_timeout(data, 0);
54
    return async_get_call_timeout(data, 0);
59
}
55
}
60
 
56
 
-
 
57
static inline void async_manager(void)
-
 
58
{
-
 
59
    fibril_switch(FIBRIL_TO_MANAGER);
-
 
60
}
-
 
61
 
61
/*
62
/*
62
 * User-friendly wrappers for async_send_fast() and async_send_slow(). The
63
 * User-friendly wrappers for async_send_fast() and async_send_slow(). The
63
 * macros are in the form async_send_m(), where m denotes the number of payload
64
 * macros are in the form async_send_m(), where m denotes the number of payload
64
 * arguments.  Each macros chooses between the fast and the slow version based
65
 * arguments.  Each macros chooses between the fast and the slow version based
65
 * on m.
66
 * on m.
Line 92... Line 93...
92
extern fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid,
93
extern fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid,
93
    ipc_call_t *call, void (*cthread)(ipc_callid_t, ipc_call_t *));
94
    ipc_call_t *call, void (*cthread)(ipc_callid_t, ipc_call_t *));
94
extern void async_usleep(suseconds_t timeout);
95
extern void async_usleep(suseconds_t timeout);
95
extern void async_create_manager(void);
96
extern void async_create_manager(void);
96
extern void async_destroy_manager(void);
97
extern void async_destroy_manager(void);
97
extern int _async_init(void);
-
 
98
 
98
 
99
extern void async_set_client_connection(async_client_conn_t conn);
99
extern void async_set_client_connection(async_client_conn_t conn);
100
extern void async_set_interrupt_received(async_client_conn_t conn);
100
extern void async_set_interrupt_received(async_client_conn_t conn);
101
 
101
 
102
/* Wrappers for simple communication */
102
/* Wrappers for simple communication */