Subversion Repositories HelenOS

Rev

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

Rev 4377 Rev 4692
Line 42... Line 42...
42
#include <bool.h>
42
#include <bool.h>
43
 
43
 
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
static inline void async_manager(void)
47
extern atomic_t async_futex;
48
{
48
 
49
    fibril_switch(FIBRIL_TO_MANAGER);
49
extern int __async_init(void);
50
}
-
 
-
 
50
extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs);
51
 
51
 
52
ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs);
-
 
53
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)
54
{
53
{
55
    return async_get_call_timeout(data, 0);
54
    return async_get_call_timeout(data, 0);
56
}
55
}
57
 
56
 
-
 
57
static inline void async_manager(void)
-
 
58
{
-
 
59
    fibril_switch(FIBRIL_TO_MANAGER);
-
 
60
}
-
 
61
 
58
/*
62
/*
59
 * 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
60
 * 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
61
 * 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
62
 * on m.
66
 * on m.
Line 84... Line 88...
84
    ipc_call_t *dataptr);
88
    ipc_call_t *dataptr);
85
extern void async_wait_for(aid_t amsgid, ipcarg_t *result);
89
extern void async_wait_for(aid_t amsgid, ipcarg_t *result);
86
extern int async_wait_timeout(aid_t amsgid, ipcarg_t *retval,
90
extern int async_wait_timeout(aid_t amsgid, ipcarg_t *retval,
87
    suseconds_t timeout);
91
    suseconds_t timeout);
88
 
92
 
89
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,
90
    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 *));
91
void async_usleep(suseconds_t timeout);
95
extern void async_usleep(suseconds_t timeout);
92
void async_create_manager(void);
96
extern void async_create_manager(void);
93
void async_destroy_manager(void);
97
extern void async_destroy_manager(void);
94
int _async_init(void);
-
 
95
 
98
 
96
extern void async_set_client_connection(async_client_conn_t conn);
99
extern void async_set_client_connection(async_client_conn_t conn);
97
extern void async_set_interrupt_received(async_client_conn_t conn);
100
extern void async_set_interrupt_received(async_client_conn_t conn);
98
 
101
 
99
/* Wrappers for simple communication */
102
/* Wrappers for simple communication */
Line 251... Line 254...
251
static inline void async_serialize_end(void)
254
static inline void async_serialize_end(void)
252
{
255
{
253
    fibril_dec_sercount();
256
    fibril_dec_sercount();
254
}
257
}
255
 
258
 
256
extern atomic_t async_futex;
-
 
257
 
-
 
258
#endif
259
#endif
259
 
260
 
260
/** @}
261
/** @}
261
 */
262
 */