Subversion Repositories HelenOS

Rev

Rev 1452 | Rev 1464 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1394 palkovsky 1
#ifndef _libc_ASYNC_H_
2
#define _libc_ASYNC_H_
3
 
4
#include <ipc/ipc.h>
1407 palkovsky 5
#include <psthread.h>
1449 palkovsky 6
#include <sys/time.h>
1463 palkovsky 7
#include <atomic.h>
1394 palkovsky 8
 
1427 palkovsky 9
typedef ipc_callid_t aid_t;
10
 
1394 palkovsky 11
int async_manager(void);
12
void async_create_manager(void);
13
void async_destroy_manager(void);
14
int _async_init(void);
15
ipc_callid_t async_get_call(ipc_call_t *data);
16
 
1427 palkovsky 17
aid_t async_send_2(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
18
           ipc_call_t *dataptr);
19
void async_wait_for(aid_t amsgid, ipcarg_t *result);
1441 palkovsky 20
int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout);
1452 palkovsky 21
pstid_t async_new_connection(ipcarg_t in_phone_hash,ipc_callid_t callid,
22
                 ipc_call_t *call,
23
                 void (*cthread)(ipc_callid_t,ipc_call_t *));
24
void async_usleep(suseconds_t timeout);
1427 palkovsky 25
 
26
/* Should be defined by application */
1394 palkovsky 27
void client_connection(ipc_callid_t callid, ipc_call_t *call) __attribute__((weak));
1452 palkovsky 28
void interrupt_received(ipc_call_t *call)  __attribute__((weak));
1394 palkovsky 29
 
1463 palkovsky 30
 
31
extern atomic_t async_futex;
32
 
1394 palkovsky 33
#endif