Rev 1470 | Rev 1500 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1470 | Rev 1490 | ||
---|---|---|---|
Line 126... | Line 126... | ||
126 | ipc_callid_t callid; |
126 | ipc_callid_t callid; |
127 | ipc_call_t call; |
127 | ipc_call_t call; |
128 | void (*cthread)(ipc_callid_t,ipc_call_t *); |
128 | void (*cthread)(ipc_callid_t,ipc_call_t *); |
129 | } connection_t; |
129 | } connection_t; |
130 | 130 | ||
- | 131 | ||
131 | __thread connection_t *PS_connection; |
132 | __thread connection_t *PS_connection; |
132 | 133 | ||
- | 134 | static void default_client_connection(ipc_callid_t callid, ipc_call_t *call); |
|
- | 135 | static async_client_conn_t client_connection = default_client_connection; |
|
- | 136 | ||
133 | /** Add microseconds to give timeval */ |
137 | /** Add microseconds to give timeval */ |
134 | static void tv_add(struct timeval *tv, suseconds_t usecs) |
138 | static void tv_add(struct timeval *tv, suseconds_t usecs) |
135 | { |
139 | { |
136 | tv->tv_sec += usecs / 1000000; |
140 | tv->tv_sec += usecs / 1000000; |
137 | tv->tv_usec += usecs % 1000000; |
141 | tv->tv_usec += usecs % 1000000; |
Line 270... | Line 274... | ||
270 | /** Thread function that gets created on new connection |
274 | /** Thread function that gets created on new connection |
271 | * |
275 | * |
272 | * This function is defined as a weak symbol - to be redefined in |
276 | * This function is defined as a weak symbol - to be redefined in |
273 | * user code. |
277 | * user code. |
274 | */ |
278 | */ |
275 | void client_connection(ipc_callid_t callid, ipc_call_t *call) |
279 | static void default_client_connection(ipc_callid_t callid, ipc_call_t *call) |
276 | { |
280 | { |
277 | ipc_answer_fast(callid, ENOENT, 0, 0); |
281 | ipc_answer_fast(callid, ENOENT, 0, 0); |
278 | } |
282 | } |
279 | 283 | ||
280 | /** Function that gets called on interrupt receival |
284 | /** Function that gets called on interrupt receival |
Line 668... | Line 672... | ||
668 | /* Leave locked async_futex when entering this function */ |
672 | /* Leave locked async_futex when entering this function */ |
669 | psthread_schedule_next_adv(PS_TO_MANAGER); |
673 | psthread_schedule_next_adv(PS_TO_MANAGER); |
670 | /* futex is up automatically after psthread_schedule_next...*/ |
674 | /* futex is up automatically after psthread_schedule_next...*/ |
671 | free(msg); |
675 | free(msg); |
672 | } |
676 | } |
- | 677 | ||
- | 678 | /** Set function that is called, IPC_M_CONNECT_ME_TO is received |
|
- | 679 | * |
|
- | 680 | * @param conn Function that will form new psthread. |
|
- | 681 | */ |
|
- | 682 | void async_set_client_connection(async_client_conn_t conn) |
|
- | 683 | { |
|
- | 684 | client_connection = conn; |
|
- | 685 | } |