Changeset 46b881c in mainline for uspace/lib
- Timestamp:
- 2011-01-29T11:36:41Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b6931a, 8add9ca5
- Parents:
- e26a4633 (diff), ffa2c8ef (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib
- Files:
-
- 1 added
- 78 edited
-
block/libblock.c (modified) (5 diffs)
-
c/generic/async.c (modified) (6 diffs)
-
c/generic/async_sess.c (modified) (4 diffs)
-
c/generic/ddi.c (modified) (1 diff)
-
c/generic/devman.c (modified) (5 diffs)
-
c/generic/devmap.c (modified) (4 diffs)
-
c/generic/event.c (modified) (1 diff)
-
c/generic/fibril_synch.c (modified) (1 diff)
-
c/generic/io/io.c (modified) (2 diffs)
-
c/generic/ipc.c (modified) (2 diffs)
-
c/generic/ipc/ns.c (modified) (1 diff)
-
c/generic/libc.c (modified) (1 diff)
-
c/generic/loader.c (modified) (3 diffs)
-
c/generic/net/icmp_api.c (modified) (1 diff)
-
c/generic/net/modules.c (modified) (4 diffs)
-
c/generic/net/socket_client.c (modified) (3 diffs)
-
c/generic/time.c (modified) (6 diffs)
-
c/generic/udebug.c (modified) (1 diff)
-
c/generic/vfs/vfs.c (modified) (2 diffs)
-
c/include/async.h (modified) (8 diffs)
-
c/include/ddi.h (modified) (2 diffs)
-
c/include/devman.h (modified) (1 diff)
-
c/include/event.h (modified) (1 diff)
-
c/include/io/console.h (modified) (1 diff)
-
c/include/io/screenbuffer.h (modified) (1 diff)
-
c/include/ipc/adb.h (modified) (1 diff)
-
c/include/ipc/arp.h (modified) (1 diff)
-
c/include/ipc/bd.h (modified) (1 diff)
-
c/include/ipc/char.h (modified) (1 diff)
-
c/include/ipc/clipboard.h (modified) (1 diff)
-
c/include/ipc/common.h (added)
-
c/include/ipc/console.h (modified) (1 diff)
-
c/include/ipc/dev_iface.h (modified) (1 diff)
-
c/include/ipc/devman.h (modified) (4 diffs)
-
c/include/ipc/devmap.h (modified) (1 diff)
-
c/include/ipc/fb.h (modified) (1 diff)
-
c/include/ipc/icmp.h (modified) (1 diff)
-
c/include/ipc/il.h (modified) (1 diff)
-
c/include/ipc/ip.h (modified) (1 diff)
-
c/include/ipc/ipc.h (modified) (2 diffs)
-
c/include/ipc/irc.h (modified) (1 diff)
-
c/include/ipc/kbd.h (modified) (1 diff)
-
c/include/ipc/loader.h (modified) (1 diff)
-
c/include/ipc/mouse.h (modified) (1 diff)
-
c/include/ipc/net.h (modified) (1 diff)
-
c/include/ipc/net_net.h (modified) (1 diff)
-
c/include/ipc/netif.h (modified) (1 diff)
-
c/include/ipc/nil.h (modified) (1 diff)
-
c/include/ipc/ns.h (modified) (2 diffs)
-
c/include/ipc/packet.h (modified) (1 diff)
-
c/include/ipc/services.h (modified) (2 diffs)
-
c/include/ipc/socket.h (modified) (1 diff)
-
c/include/ipc/tl.h (modified) (1 diff)
-
c/include/ipc/vfs.h (modified) (1 diff)
-
c/include/net/modules.h (modified) (1 diff)
-
c/include/udebug.h (modified) (1 diff)
-
clui/tinput.h (modified) (1 diff)
-
drv/generic/driver.c (modified) (12 diffs)
-
drv/generic/remote_char_dev.c (modified) (9 diffs)
-
drv/generic/remote_hw_res.c (modified) (4 diffs)
-
drv/include/dev_iface.h (modified) (1 diff)
-
drv/include/driver.h (modified) (1 diff)
-
fs/libfs.c (modified) (30 diffs)
-
fs/libfs.h (modified) (2 diffs)
-
net/generic/generic.c (modified) (1 diff)
-
net/generic/packet_remote.c (modified) (1 diff)
-
net/il/arp_remote.c (modified) (1 diff)
-
net/il/il_skel.c (modified) (2 diffs)
-
net/include/generic.h (modified) (1 diff)
-
net/include/il_skel.h (modified) (1 diff)
-
net/include/netif_skel.h (modified) (1 diff)
-
net/include/nil_skel.h (modified) (1 diff)
-
net/include/tl_skel.h (modified) (1 diff)
-
net/netif/netif_skel.c (modified) (2 diffs)
-
net/nil/nil_skel.c (modified) (2 diffs)
-
net/tl/icmp_remote.c (modified) (1 diff)
-
net/tl/tl_skel.c (modified) (2 diffs)
-
packet/generic/packet_server.c (modified) (2 diffs)
-
packet/include/packet_server.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/libblock.c
re26a4633 r46b881c 44 44 #include <sys/mman.h> 45 45 #include <async.h> 46 #include <ipc/ipc.h>47 46 #include <as.h> 48 47 #include <assert.h> … … 177 176 if (rc != EOK) { 178 177 munmap(comm_area, comm_size); 179 ipc_hangup(dev_phone);178 async_hangup(dev_phone); 180 179 return rc; 181 180 } … … 183 182 if (get_block_size(dev_phone, &bsize) != EOK) { 184 183 munmap(comm_area, comm_size); 185 ipc_hangup(dev_phone);184 async_hangup(dev_phone); 186 185 return rc; 187 186 } … … 190 189 if (rc != EOK) { 191 190 munmap(comm_area, comm_size); 192 ipc_hangup(dev_phone);191 async_hangup(dev_phone); 193 192 return rc; 194 193 } … … 211 210 212 211 munmap(devcon->comm_area, devcon->comm_size); 213 ipc_hangup(devcon->dev_phone);212 async_hangup(devcon->dev_phone); 214 213 215 214 free(devcon); -
uspace/lib/c/generic/async.c
re26a4633 r46b881c 77 77 * { 78 78 * if (want_refuse) { 79 * ipc_answer_0(icallid, ELIMIT);79 * async_answer_0(icallid, ELIMIT); 80 80 * return; 81 81 * } 82 * ipc_answer_0(icallid, EOK);82 * async_answer_0(icallid, EOK); 83 83 * 84 84 * callid = async_get_call(&call); 85 85 * somehow_handle_the_call(callid, call); 86 * ipc_answer_2(callid, 1, 2, 3);86 * async_answer_2(callid, 1, 2, 3); 87 87 * 88 88 * callid = async_get_call(&call); … … 92 92 */ 93 93 94 #define LIBC_ASYNC_C_ 95 #include <ipc/ipc.h> 96 #include <async.h> 97 #undef LIBC_ASYNC_C_ 98 94 99 #include <futex.h> 95 #include <async.h>96 100 #include <fibril.h> 97 101 #include <stdio.h> 98 102 #include <adt/hash_table.h> 99 103 #include <adt/list.h> 100 #include <ipc/ipc.h>101 104 #include <assert.h> 102 105 #include <errno.h> … … 1235 1238 } 1236 1239 1240 void async_msg_0(int phone, sysarg_t imethod) 1241 { 1242 ipc_call_async_0(phone, imethod, NULL, NULL, true); 1243 } 1244 1245 void async_msg_1(int phone, sysarg_t imethod, sysarg_t arg1) 1246 { 1247 ipc_call_async_1(phone, imethod, arg1, NULL, NULL, true); 1248 } 1249 1250 void async_msg_2(int phone, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2) 1251 { 1252 ipc_call_async_2(phone, imethod, arg1, arg2, NULL, NULL, true); 1253 } 1254 1255 void async_msg_3(int phone, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, 1256 sysarg_t arg3) 1257 { 1258 ipc_call_async_3(phone, imethod, arg1, arg2, arg3, NULL, NULL, true); 1259 } 1260 1261 void async_msg_4(int phone, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, 1262 sysarg_t arg3, sysarg_t arg4) 1263 { 1264 ipc_call_async_4(phone, imethod, arg1, arg2, arg3, arg4, NULL, NULL, 1265 true); 1266 } 1267 1268 void async_msg_5(int phone, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, 1269 sysarg_t arg3, sysarg_t arg4, sysarg_t arg5) 1270 { 1271 ipc_call_async_5(phone, imethod, arg1, arg2, arg3, arg4, arg5, NULL, 1272 NULL, true); 1273 } 1274 1275 sysarg_t async_answer_0(ipc_callid_t callid, sysarg_t retval) 1276 { 1277 return ipc_answer_0(callid, retval); 1278 } 1279 1280 sysarg_t async_answer_1(ipc_callid_t callid, sysarg_t retval, sysarg_t arg1) 1281 { 1282 return ipc_answer_1(callid, retval, arg1); 1283 } 1284 1285 sysarg_t async_answer_2(ipc_callid_t callid, sysarg_t retval, sysarg_t arg1, 1286 sysarg_t arg2) 1287 { 1288 return ipc_answer_2(callid, retval, arg1, arg2); 1289 } 1290 1291 sysarg_t async_answer_3(ipc_callid_t callid, sysarg_t retval, sysarg_t arg1, 1292 sysarg_t arg2, sysarg_t arg3) 1293 { 1294 return ipc_answer_3(callid, retval, arg1, arg2, arg3); 1295 } 1296 1297 sysarg_t async_answer_4(ipc_callid_t callid, sysarg_t retval, sysarg_t arg1, 1298 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4) 1299 { 1300 return ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4); 1301 } 1302 1303 sysarg_t async_answer_5(ipc_callid_t callid, sysarg_t retval, sysarg_t arg1, 1304 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5) 1305 { 1306 return ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5); 1307 } 1308 1309 int async_forward_fast(ipc_callid_t callid, int phoneid, int imethod, 1310 sysarg_t arg1, sysarg_t arg2, int mode) 1311 { 1312 return ipc_forward_fast(callid, phoneid, imethod, arg1, arg2, mode); 1313 } 1314 1315 int async_forward_slow(ipc_callid_t callid, int phoneid, int imethod, 1316 sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, 1317 int mode) 1318 { 1319 return ipc_forward_slow(callid, phoneid, imethod, arg1, arg2, arg3, arg4, 1320 arg5, mode); 1321 } 1322 1237 1323 /** Wrapper for making IPC_M_CONNECT_TO_ME calls using the async framework. 1238 1324 * … … 1314 1400 1315 1401 return newphid; 1402 } 1403 1404 /** Connect to a task specified by id. 1405 * 1406 */ 1407 int async_connect_kbox(task_id_t id) 1408 { 1409 return ipc_connect_kbox(id); 1410 } 1411 1412 /** Wrapper for ipc_hangup. 1413 * 1414 * @param phone Phone handle to hung up. 1415 * 1416 * @return Zero on success or a negative error code. 1417 * 1418 */ 1419 int async_hangup(int phone) 1420 { 1421 return ipc_hangup(phone); 1422 } 1423 1424 /** Interrupt one thread of this task from waiting for IPC. */ 1425 void async_poke(void) 1426 { 1427 ipc_poke(); 1316 1428 } 1317 1429 … … 1503 1615 1504 1616 /** Wrapper for forwarding any read request 1505 *1506 1617 * 1507 1618 */ … … 1690 1801 /** Wrapper for forwarding any data that is about to be received 1691 1802 * 1692 *1693 1803 */ 1694 1804 int async_data_write_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1, -
uspace/lib/c/generic/async_sess.c
re26a4633 r46b881c 99 99 100 100 #include <async_sess.h> 101 #include <ipc/ipc.h>102 101 #include <fibril_synch.h> 103 102 #include <adt/list.h> … … 200 199 list_remove(&conn->global_link); 201 200 202 ipc_hangup(conn->data_phone);201 async_hangup(conn->data_phone); 203 202 free(conn); 204 203 } … … 260 259 data_phone = conn->data_phone; 261 260 free(conn); 262 ipc_hangup(data_phone);261 async_hangup(data_phone); 263 262 goto retry; 264 263 } else { … … 292 291 * means that we simply hang up. 293 292 */ 294 ipc_hangup(data_phone);293 async_hangup(data_phone); 295 294 fibril_mutex_unlock(&async_sess_mutex); 296 295 return; -
uspace/lib/c/generic/ddi.c
re26a4633 r46b881c 127 127 } 128 128 129 /** Register IRQ notification. 130 * 131 * @param inr IRQ number. 132 * @param devno Device number of the device generating inr. 133 * @param method Use this method for notifying me. 134 * @param ucode Top-half pseudocode handler. 135 * 136 * @return Value returned by the kernel. 137 * 138 */ 139 int register_irq(int inr, int devno, int method, irq_code_t *ucode) 140 { 141 return __SYSCALL4(SYS_IPC_REGISTER_IRQ, inr, devno, method, 142 (sysarg_t) ucode); 143 } 144 145 /** Unregister IRQ notification. 146 * 147 * @param inr IRQ number. 148 * @param devno Device number of the device generating inr. 149 * 150 * @return Value returned by the kernel. 151 * 152 */ 153 int unregister_irq(int inr, int devno) 154 { 155 return __SYSCALL2(SYS_IPC_UNREGISTER_IRQ, inr, devno); 156 } 157 129 158 /** @} 130 159 */ -
uspace/lib/c/generic/devman.c
re26a4633 r46b881c 28 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 */ 30 31 /** @addtogroup libc30 31 /** @addtogroup libc 32 32 * @{ 33 33 */ … … 37 37 #include <str.h> 38 38 #include <stdio.h> 39 #include <ipc/ipc.h>40 39 #include <ipc/services.h> 41 40 #include <ipc/devman.h> … … 116 115 async_set_client_connection(conn); 117 116 118 ipc_connect_to_me(phone, 0, 0, 0, NULL, NULL);117 async_connect_to_me(phone, 0, 0, 0, NULL); 119 118 async_wait_for(req, &retval); 120 119 … … 221 220 case DEVMAN_DRIVER: 222 221 if (devman_phone_driver >= 0) { 223 ipc_hangup(devman_phone_driver);222 async_hangup(devman_phone_driver); 224 223 devman_phone_driver = -1; 225 224 } … … 227 226 case DEVMAN_CLIENT: 228 227 if (devman_phone_client >= 0) { 229 ipc_hangup(devman_phone_client);228 async_hangup(devman_phone_client); 230 229 devman_phone_client = -1; 231 230 } -
uspace/lib/c/generic/devmap.c
re26a4633 r46b881c 29 29 30 30 #include <str.h> 31 #include <ipc/ipc.h>32 31 #include <ipc/services.h> 33 32 #include <ipc/ns.h> … … 80 79 case DEVMAP_DRIVER: 81 80 if (devmap_phone_driver >= 0) { 82 ipc_hangup(devmap_phone_driver);81 async_hangup(devmap_phone_driver); 83 82 devmap_phone_driver = -1; 84 83 } … … 86 85 case DEVMAP_CLIENT: 87 86 if (devmap_phone_client >= 0) { 88 ipc_hangup(devmap_phone_client);87 async_hangup(devmap_phone_client); 89 88 devmap_phone_client = -1; 90 89 } … … 117 116 async_set_client_connection(conn); 118 117 119 ipc_connect_to_me(phone, 0, 0, 0, NULL, NULL);118 async_connect_to_me(phone, 0, 0, 0, NULL); 120 119 async_wait_for(req, &retval); 121 120 -
uspace/lib/c/generic/event.c
re26a4633 r46b881c 35 35 */ 36 36 /** @file 37 */ 37 */ 38 38 39 39 #include <libc.h> 40 40 #include <event.h> 41 41 #include <kernel/ipc/event_types.h> 42 #include <ipc/ipc.h>43 42 44 43 /** Subscribe for event notifications. -
uspace/lib/c/generic/fibril_synch.c
re26a4633 r46b881c 55 55 */ 56 56 if (atomic_get(&threads_in_ipc_wait) > 0) 57 ipc_poke();57 async_poke(); 58 58 } 59 59 -
uspace/lib/c/generic/io/io.c
re26a4633 r46b881c 41 41 #include <bool.h> 42 42 #include <malloc.h> 43 #include <async.h> 43 44 #include <io/klog.h> 44 45 #include <vfs/vfs.h> … … 322 323 323 324 if (stream->phone >= 0) 324 ipc_hangup(stream->phone);325 async_hangup(stream->phone); 325 326 326 327 if (stream->fd >= 0) -
uspace/lib/c/generic/ipc.c
re26a4633 r46b881c 45 45 #include <errno.h> 46 46 #include <adt/list.h> 47 #include <stdio.h>48 #include <unistd.h>49 47 #include <futex.h> 50 #include <kernel/synch/synch.h>51 #include <async.h>52 48 #include <fibril.h> 53 #include <assert.h>54 49 55 50 /** … … 650 645 } 651 646 652 /** Register IRQ notification.653 *654 * @param inr IRQ number.655 * @param devno Device number of the device generating inr.656 * @param method Use this method for notifying me.657 * @param ucode Top-half pseudocode handler.658 *659 * @return Value returned by the kernel.660 */661 int ipc_register_irq(int inr, int devno, int method, irq_code_t *ucode)662 {663 return __SYSCALL4(SYS_IPC_REGISTER_IRQ, inr, devno, method,664 (sysarg_t) ucode);665 }666 667 /** Unregister IRQ notification.668 *669 * @param inr IRQ number.670 * @param devno Device number of the device generating inr.671 *672 * @return Value returned by the kernel.673 */674 int ipc_unregister_irq(int inr, int devno)675 {676 return __SYSCALL2(SYS_IPC_UNREGISTER_IRQ, inr, devno);677 }678 679 647 /** Forward a received call to another destination. 680 648 * -
uspace/lib/c/generic/ipc/ns.c
re26a4633 r46b881c 79 79 } 80 80 81 void *service_realtime_share_in(void) 82 { 83 void *rtime = as_get_mappable_page(PAGE_SIZE); 84 if (rtime == NULL) 85 return NULL; 86 87 int res = async_share_in_start_1_0(PHONE_NS, rtime, PAGE_SIZE, 88 SERVICE_MEM_REALTIME); 89 if (res != EOK) { 90 as_area_destroy((void *) rtime); 91 return NULL; 92 } 93 94 return rtime; 95 } 96 81 97 /** @} 82 98 */ -
uspace/lib/c/generic/libc.c
re26a4633 r46b881c 47 47 #include <thread.h> 48 48 #include <fibril.h> 49 #include <ipc/ipc.h>50 49 #include <async.h> 51 50 #include <as.h> -
uspace/lib/c/generic/loader.c
re26a4633 r46b881c 33 33 */ 34 34 35 #include <ipc/ipc.h>36 35 #include <ipc/loader.h> 37 36 #include <ipc/services.h> … … 320 319 return rc; 321 320 322 ipc_hangup(ldr->phone_id);321 async_hangup(ldr->phone_id); 323 322 ldr->phone_id = 0; 324 323 return EOK; … … 338 337 void loader_abort(loader_t *ldr) 339 338 { 340 ipc_hangup(ldr->phone_id);339 async_hangup(ldr->phone_id); 341 340 ldr->phone_id = 0; 342 341 } -
uspace/lib/c/generic/net/icmp_api.c
re26a4633 r46b881c 41 41 #include <net/modules.h> 42 42 #include <net/ip_codes.h> 43 44 43 #include <async.h> 45 44 #include <sys/types.h> 46 45 #include <sys/time.h> 47 46 #include <errno.h> 48 49 #include <ipc/ipc.h>50 47 #include <ipc/services.h> 51 48 #include <ipc/icmp.h> -
uspace/lib/c/generic/net/modules.c
re26a4633 r46b881c 43 43 #include <errno.h> 44 44 #include <sys/time.h> 45 46 #include <ipc/ipc.h>47 45 #include <ipc/services.h> 48 49 46 #include <net/modules.h> 50 47 … … 67 64 switch (count) { 68 65 case 0: 69 ipc_answer_0(callid, (sysarg_t) result);66 async_answer_0(callid, (sysarg_t) result); 70 67 break; 71 68 case 1: 72 ipc_answer_1(callid, (sysarg_t) result,69 async_answer_1(callid, (sysarg_t) result, 73 70 IPC_GET_ARG1(*answer)); 74 71 break; 75 72 case 2: 76 ipc_answer_2(callid, (sysarg_t) result,73 async_answer_2(callid, (sysarg_t) result, 77 74 IPC_GET_ARG1(*answer), IPC_GET_ARG2(*answer)); 78 75 break; 79 76 case 3: 80 ipc_answer_3(callid, (sysarg_t) result,77 async_answer_3(callid, (sysarg_t) result, 81 78 IPC_GET_ARG1(*answer), IPC_GET_ARG2(*answer), 82 79 IPC_GET_ARG3(*answer)); 83 80 break; 84 81 case 4: 85 ipc_answer_4(callid, (sysarg_t) result,82 async_answer_4(callid, (sysarg_t) result, 86 83 IPC_GET_ARG1(*answer), IPC_GET_ARG2(*answer), 87 84 IPC_GET_ARG3(*answer), IPC_GET_ARG4(*answer)); … … 89 86 case 5: 90 87 default: 91 ipc_answer_5(callid, (sysarg_t) result,88 async_answer_5(callid, (sysarg_t) result, 92 89 IPC_GET_ARG1(*answer), IPC_GET_ARG2(*answer), 93 90 IPC_GET_ARG3(*answer), IPC_GET_ARG4(*answer), … … 137 134 sysarg_t arg3, async_client_conn_t client_receiver, suseconds_t timeout) 138 135 { 139 int rc;140 141 136 /* Connect to the needed service */ 142 137 int phone = connect_to_service_timeout(need, timeout); 143 138 if (phone >= 0) { 144 139 /* Request the bidirectional connection */ 145 sysarg_t taskhash; 146 sysarg_t phonehash; 147 148 rc = ipc_connect_to_me(phone, arg1, arg2, arg3, &taskhash, 149 &phonehash); 140 int rc = async_connect_to_me(phone, arg1, arg2, arg3, client_receiver); 150 141 if (rc != EOK) { 151 ipc_hangup(phone);142 async_hangup(phone); 152 143 return rc; 153 144 } 154 async_new_connection(taskhash, phonehash, 0, NULL,155 client_receiver);156 145 } 157 146 -
uspace/lib/c/generic/net/socket_client.c
re26a4633 r46b881c 43 43 #include <stdlib.h> 44 44 #include <errno.h> 45 45 #include <task.h> 46 46 #include <ipc/services.h> 47 47 #include <ipc/socket.h> 48 49 48 #include <net/modules.h> 50 49 #include <net/in.h> … … 278 277 } 279 278 280 ipc_answer_0(callid, (sysarg_t) rc);279 async_answer_0(callid, (sysarg_t) rc); 281 280 goto loop; 282 281 } … … 687 686 688 687 /* Read address */ 689 ipc_data_read_start(socket->phone, cliaddr, *addrlen);688 async_data_read_start(socket->phone, cliaddr, *addrlen); 690 689 fibril_rwlock_write_unlock(&socket_globals.lock); 691 690 async_wait_for(message_id, &ipc_result); -
uspace/lib/c/generic/time.c
re26a4633 r46b881c 35 35 #include <sys/time.h> 36 36 #include <unistd.h> 37 #include < ipc/ipc.h>38 #include < stdio.h>37 #include <bool.h> 38 #include <ipc/ns.h> 39 39 #include <arch/barrier.h> 40 #include <unistd.h> 41 #include <atomic.h> 42 #include <sysinfo.h> 43 #include <ipc/services.h> 40 #include <macros.h> 44 41 #include <libc.h> 45 46 #include <sysinfo.h>47 #include <as.h>48 #include <ddi.h>49 50 42 #include <time.h> 51 43 52 /* Pointers to publicvariables with time */44 /** Pointer to kernel shared variables with time */ 53 45 struct { 54 46 volatile sysarg_t seconds1; … … 59 51 /** Add microseconds to given timeval. 60 52 * 61 * @param tv Destination timeval. 62 * @param usecs Number of microseconds to add. 53 * @param tv Destination timeval. 54 * @param usecs Number of microseconds to add. 55 * 63 56 */ 64 57 void tv_add(struct timeval *tv, suseconds_t usecs) … … 66 59 tv->tv_sec += usecs / 1000000; 67 60 tv->tv_usec += usecs % 1000000; 61 68 62 if (tv->tv_usec > 1000000) { 69 63 tv->tv_sec++; … … 74 68 /** Subtract two timevals. 75 69 * 76 * @param tv1 First timeval. 77 * @param tv2 Second timeval. 78 * 79 * @return Return difference between tv1 and tv2 (tv1 - tv2) in 80 * microseconds. 70 * @param tv1 First timeval. 71 * @param tv2 Second timeval. 72 * 73 * @return Difference between tv1 and tv2 (tv1 - tv2) in 74 * microseconds. 75 * 81 76 */ 82 77 suseconds_t tv_sub(struct timeval *tv1, struct timeval *tv2) 83 78 { 84 suseconds_t result; 85 86 result = tv1->tv_usec - tv2->tv_usec; 87 result += (tv1->tv_sec - tv2->tv_sec) * 1000000; 88 89 return result; 79 return (tv1->tv_usec - tv2->tv_usec) + 80 ((tv1->tv_sec - tv2->tv_sec) * 1000000); 90 81 } 91 82 92 83 /** Decide if one timeval is greater than the other. 93 84 * 94 * @param t1 First timeval. 95 * @param t2 Second timeval. 96 * 97 * @return Return true tv1 is greater than tv2. Otherwise return 98 * false. 85 * @param t1 First timeval. 86 * @param t2 Second timeval. 87 * 88 * @return True if tv1 is greater than tv2. 89 * @return False otherwise. 90 * 99 91 */ 100 92 int tv_gt(struct timeval *tv1, struct timeval *tv2) 101 93 { 102 94 if (tv1->tv_sec > tv2->tv_sec) 103 return 1; 104 if (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec > tv2->tv_usec) 105 return 1; 106 return 0; 95 return true; 96 97 if ((tv1->tv_sec == tv2->tv_sec) && (tv1->tv_usec > tv2->tv_usec)) 98 return true; 99 100 return false; 107 101 } 108 102 109 103 /** Decide if one timeval is greater than or equal to the other. 110 104 * 111 * @param tv1 First timeval. 112 * @param tv2 Second timeval. 113 * 114 * @return Return true if tv1 is greater than or equal to tv2. 115 * Otherwise return false. 105 * @param tv1 First timeval. 106 * @param tv2 Second timeval. 107 * 108 * @return True if tv1 is greater than or equal to tv2. 109 * @return False otherwise. 110 * 116 111 */ 117 112 int tv_gteq(struct timeval *tv1, struct timeval *tv2) 118 113 { 119 114 if (tv1->tv_sec > tv2->tv_sec) 120 return 1; 121 if (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec >= tv2->tv_usec) 122 return 1; 123 return 0; 124 } 125 126 127 /** POSIX gettimeofday 128 * 129 * The time variables are memory mapped(RO) from kernel, which updates 130 * them periodically. As it is impossible to read 2 values atomically, we 131 * use a trick: First read a seconds, then read microseconds, then 132 * read seconds again. If a second elapsed in the meantime, set it to zero. 133 * This provides assurance, that at least the 134 * sequence of subsequent gettimeofday calls is ordered. 115 return true; 116 117 if ((tv1->tv_sec == tv2->tv_sec) && (tv1->tv_usec >= tv2->tv_usec)) 118 return true; 119 120 return false; 121 } 122 123 /** Get time of day 124 * 125 * The time variables are memory mapped (read-only) from kernel which 126 * updates them periodically. 127 * 128 * As it is impossible to read 2 values atomically, we use a trick: 129 * First we read the seconds, then we read the microseconds, then we 130 * read the seconds again. If a second elapsed in the meantime, set 131 * the microseconds to zero. 132 * 133 * This assures that the values returned by two subsequent calls 134 * to gettimeofday() are monotonous. 135 * 135 136 */ 136 137 int gettimeofday(struct timeval *tv, struct timezone *tz) 137 138 { 138 void *mapping;139 sysarg_t s1, s2;140 int rights;141 int res;142 143 139 if (!ktime) { 144 mapping = as_get_mappable_page(PAGE_SIZE); 145 /* Get the mapping of kernel clock */ 146 res = ipc_share_in_start_1_1(PHONE_NS, mapping, PAGE_SIZE, 147 SERVICE_MEM_REALTIME, &rights); 148 if (res) { 149 printf("Failed to initialize timeofday memarea\n"); 150 _exit(1); 151 } 152 if (!(rights & AS_AREA_READ)) { 153 printf("Received bad rights on time area: %X\n", 154 rights); 155 as_area_destroy(mapping); 156 _exit(1); 157 } 158 ktime = mapping; 159 } 140 ktime = service_realtime_share_in(); 141 if (!ktime) 142 return -1; 143 } 144 160 145 if (tz) { 161 146 tz->tz_minuteswest = 0; 162 147 tz->tz_dsttime = DST_NONE; 163 148 } 164 165 s2 = ktime->seconds2; 149 150 sysarg_t s2 = ktime->seconds2; 151 166 152 read_barrier(); 167 153 tv->tv_usec = ktime->useconds; 154 168 155 read_barrier(); 169 s1 = ktime->seconds1; 156 sysarg_t s1 = ktime->seconds1; 157 170 158 if (s1 != s2) { 159 tv->tv_sec = max(s1, s2); 171 160 tv->tv_usec = 0; 172 tv->tv_sec = s1 > s2 ? s1 : s2;173 161 } else 174 162 tv->tv_sec = s1; 175 163 176 164 return 0; 177 165 } … … 180 168 { 181 169 struct timeval tv; 182 183 170 if (gettimeofday(&tv, NULL)) 184 171 return (time_t) -1; 172 185 173 if (tloc) 186 174 *tloc = tv.tv_sec; 175 187 176 return tv.tv_sec; 188 177 } 189 178 190 /** Wait unconditionally for specified number of microseconds */ 179 /** Wait unconditionally for specified number of microseconds 180 * 181 */ 191 182 int usleep(useconds_t usec) 192 183 { … … 195 186 } 196 187 197 /** Wait unconditionally for specified number of seconds */ 188 /** Wait unconditionally for specified number of seconds 189 * 190 */ 198 191 unsigned int sleep(unsigned int sec) 199 192 { 200 /* Sleep in 1000 second steps to support 201 full argument range */ 193 /* 194 * Sleep in 1000 second steps to support 195 * full argument range 196 */ 197 202 198 while (sec > 0) { 203 199 unsigned int period = (sec > 1000) ? 1000 : sec; 204 200 205 201 usleep(period * 1000000); 206 202 sec -= period; 207 203 } 204 208 205 return 0; 209 206 } -
uspace/lib/c/generic/udebug.c
re26a4633 r46b881c 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #include <udebug.h> 36 36 #include <sys/types.h> 37 #include <ipc/ipc.h>38 37 #include <async.h> 39 38 -
uspace/lib/c/generic/vfs/vfs.c
re26a4633 r46b881c 1 1 /* 2 * Copyright (c) 2008 Jakub Jermar 2 * Copyright (c) 2008 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 43 43 #include <sys/stat.h> 44 44 #include <sys/types.h> 45 #include <ipc/ipc.h>46 45 #include <ipc/services.h> 47 46 #include <ipc/ns.h> -
uspace/lib/c/include/async.h
re26a4633 r46b881c 33 33 */ 34 34 35 #if ((defined(LIBC_IPC_H_)) && (!defined(LIBC_ASYNC_C_))) 36 #error Do not intermix low-level IPC interface and async framework 37 #endif 38 35 39 #ifndef LIBC_ASYNC_H_ 36 40 #define LIBC_ASYNC_H_ 37 41 38 #include <ipc/ ipc.h>42 #include <ipc/common.h> 39 43 #include <async_sess.h> 40 44 #include <fibril.h> … … 42 46 #include <atomic.h> 43 47 #include <bool.h> 48 #include <task.h> 44 49 45 50 typedef ipc_callid_t aid_t; … … 49 54 50 55 typedef void (*async_client_conn_t)(ipc_callid_t, ipc_call_t *); 51 52 extern atomic_t async_futex;53 56 54 57 extern atomic_t threads_in_ipc_wait; … … 110 113 extern void async_set_interrupt_received(async_client_conn_t); 111 114 112 /* Wrappers for simple communication */ 113 #define async_msg_0(phone, method) \ 114 ipc_call_async_0((phone), (method), NULL, NULL, true) 115 #define async_msg_1(phone, method, arg1) \ 116 ipc_call_async_1((phone), (method), (arg1), NULL, NULL, \ 117 true) 118 #define async_msg_2(phone, method, arg1, arg2) \ 119 ipc_call_async_2((phone), (method), (arg1), (arg2), NULL, NULL, \ 120 true) 121 #define async_msg_3(phone, method, arg1, arg2, arg3) \ 122 ipc_call_async_3((phone), (method), (arg1), (arg2), (arg3), NULL, NULL, \ 123 true) 124 #define async_msg_4(phone, method, arg1, arg2, arg3, arg4) \ 125 ipc_call_async_4((phone), (method), (arg1), (arg2), (arg3), (arg4), NULL, \ 126 NULL, true) 127 #define async_msg_5(phone, method, arg1, arg2, arg3, arg4, arg5) \ 128 ipc_call_async_5((phone), (method), (arg1), (arg2), (arg3), (arg4), \ 129 (arg5), NULL, NULL, true) 115 /* 116 * Wrappers for simple communication. 117 */ 118 119 extern void async_msg_0(int, sysarg_t); 120 extern void async_msg_1(int, sysarg_t, sysarg_t); 121 extern void async_msg_2(int, sysarg_t, sysarg_t, sysarg_t); 122 extern void async_msg_3(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t); 123 extern void async_msg_4(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t); 124 extern void async_msg_5(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t, 125 sysarg_t); 126 127 /* 128 * Wrappers for answer routines. 129 */ 130 131 extern sysarg_t async_answer_0(ipc_callid_t, sysarg_t); 132 extern sysarg_t async_answer_1(ipc_callid_t, sysarg_t, sysarg_t); 133 extern sysarg_t async_answer_2(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t); 134 extern sysarg_t async_answer_3(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t, 135 sysarg_t); 136 extern sysarg_t async_answer_4(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t, 137 sysarg_t, sysarg_t); 138 extern sysarg_t async_answer_5(ipc_callid_t, sysarg_t, sysarg_t, sysarg_t, 139 sysarg_t, sysarg_t, sysarg_t); 140 141 /* 142 * Wrappers for forwarding routines. 143 */ 144 145 extern int async_forward_fast(ipc_callid_t, int, int, sysarg_t, sysarg_t, int); 146 extern int async_forward_slow(ipc_callid_t, int, int, sysarg_t, sysarg_t, 147 sysarg_t, sysarg_t, sysarg_t, int); 130 148 131 149 /* … … 135 153 * and slow verion based on m. 136 154 */ 155 137 156 #define async_req_0_0(phoneid, method) \ 138 157 async_req_fast((phoneid), (method), 0, 0, 0, 0, NULL, NULL, NULL, NULL, \ … … 270 289 extern int async_connect_me_to(int, sysarg_t, sysarg_t, sysarg_t); 271 290 extern int async_connect_me_to_blocking(int, sysarg_t, sysarg_t, sysarg_t); 291 extern int async_connect_kbox(task_id_t); 292 extern int async_hangup(int); 293 extern void async_poke(void); 272 294 273 295 /* 274 296 * User-friendly wrappers for async_share_in_start(). 275 297 */ 298 276 299 #define async_share_in_start_0_0(phoneid, dst, size) \ 277 300 async_share_in_start((phoneid), (dst), (size), 0, NULL) … … 293 316 * User-friendly wrappers for async_data_read_forward_fast(). 294 317 */ 318 295 319 #define async_data_read_forward_0_0(phoneid, method, answer) \ 296 320 async_data_read_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL) … … 329 353 * User-friendly wrappers for async_data_write_forward_fast(). 330 354 */ 355 331 356 #define async_data_write_forward_0_0(phoneid, method, answer) \ 332 357 async_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL) -
uspace/lib/c/include/ddi.h
re26a4633 r46b881c 36 36 #define LIBC_DDI_H_ 37 37 38 #include <sys/types.h> 39 #include <kernel/ddi/irq.h> 38 40 #include <task.h> 39 41 … … 42 44 extern int iospace_enable(task_id_t, void *, unsigned long); 43 45 extern int pio_enable(void *, size_t, void **); 46 extern int register_irq(int, int, int, irq_code_t *); 47 extern int unregister_irq(int, int); 44 48 45 49 #endif -
uspace/lib/c/include/devman.h
re26a4633 r46b881c 41 41 #include <bool.h> 42 42 43 44 43 extern int devman_get_phone(devman_interface_t, unsigned int); 45 44 extern void devman_hangup_phone(devman_interface_t); -
uspace/lib/c/include/event.h
re26a4633 r46b881c 37 37 38 38 #include <kernel/ipc/event_types.h> 39 #include <ipc/ipc.h>40 39 41 40 extern int event_subscribe(event_type_t, sysarg_t); -
uspace/lib/c/include/io/console.h
re26a4633 r46b881c 36 36 #define LIBC_IO_CONSOLE_H_ 37 37 38 #include <ipc/ipc.h>39 38 #include <bool.h> 40 39 -
uspace/lib/c/include/io/screenbuffer.h
re26a4633 r46b881c 38 38 #include <stdint.h> 39 39 #include <sys/types.h> 40 #include <ipc/ipc.h>41 40 #include <bool.h> 42 41 -
uspace/lib/c/include/ipc/adb.h
re26a4633 r46b881c 32 32 /** @file 33 33 * @brief ADB device interface. 34 */ 34 */ 35 35 36 36 #ifndef LIBC_IPC_ADB_H_ 37 37 #define LIBC_IPC_ADB_H_ 38 38 39 #include <ipc/ ipc.h>39 #include <ipc/common.h> 40 40 41 41 typedef enum { 42 42 ADB_REG_WRITE = IPC_FIRST_USER_METHOD 43 43 } adb_request_t; 44 45 44 46 45 typedef enum { -
uspace/lib/c/include/ipc/arp.h
re26a4633 r46b881c 39 39 #define LIBC_ARP_MESSAGES_ 40 40 41 #include <ipc/ipc.h>42 41 #include <ipc/net.h> 43 42 -
uspace/lib/c/include/ipc/bd.h
re26a4633 r46b881c 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #ifndef LIBC_IPC_BD_H_ 36 36 #define LIBC_IPC_BD_H_ 37 37 38 #include <ipc/ ipc.h>38 #include <ipc/common.h> 39 39 40 40 typedef enum { -
uspace/lib/c/include/ipc/char.h
re26a4633 r46b881c 32 32 /** @file 33 33 * @brief Character device interface. 34 */ 34 */ 35 35 36 36 #ifndef LIBC_IPC_CHAR_H_ 37 37 #define LIBC_IPC_CHAR_H_ 38 38 39 #include <ipc/ ipc.h>39 #include <ipc/common.h> 40 40 41 41 typedef enum { 42 42 CHAR_WRITE_BYTE = IPC_FIRST_USER_METHOD 43 43 } char_request_t; 44 45 44 46 45 typedef enum { -
uspace/lib/c/include/ipc/clipboard.h
re26a4633 r46b881c 36 36 #define LIBC_IPC_CLIPBOARD_H_ 37 37 38 #include <ipc/ipc.h>39 40 38 typedef enum { 41 39 CLIPBOARD_PUT_DATA = IPC_FIRST_USER_METHOD, -
uspace/lib/c/include/ipc/console.h
re26a4633 r46b881c 36 36 #define LIBC_IPC_CONSOLE_H_ 37 37 38 #include <ipc/ipc.h>39 38 #include <ipc/vfs.h> 40 39 -
uspace/lib/c/include/ipc/dev_iface.h
re26a4633 r46b881c 30 30 #define LIBC_IPC_DEV_IFACE_H_ 31 31 32 #include <ipc/ipc.h>33 32 #include <malloc.h> 34 33 #include <unistd.h> -
uspace/lib/c/include/ipc/devman.h
re26a4633 r46b881c 30 30 * @{ 31 31 */ 32 32 33 33 #ifndef LIBC_IPC_DEVMAN_H_ 34 34 #define LIBC_IPC_DEVMAN_H_ 35 35 36 #include <ipc/common.h> 36 37 #include <adt/list.h> 37 #include <ipc/ipc.h> 38 #include <stdlib.h> 39 #include <stdio.h> 40 #include <str.h> 38 #include <malloc.h> 39 #include <mem.h> 41 40 42 #define DEVMAN_NAME_MAXLEN 25641 #define DEVMAN_NAME_MAXLEN 256 43 42 44 43 typedef sysarg_t devman_handle_t; … … 67 66 } match_id_list_t; 68 67 69 70 static inline match_id_t * create_match_id() 68 static inline match_id_t *create_match_id(void) 71 69 { 72 70 match_id_t *id = malloc(sizeof(match_id_t)); … … 85 83 } 86 84 87 static inline void add_match_id(match_id_list_t *ids, match_id_t *id) 85 static inline void add_match_id(match_id_list_t *ids, match_id_t *id) 88 86 { 89 87 match_id_t *mid = NULL; 90 link_t *link = ids->ids.next; 88 link_t *link = ids->ids.next; 91 89 92 90 while (link != &ids->ids) { … … 98 96 } 99 97 100 list_insert_before(&id->link, link); 98 list_insert_before(&id->link, link); 101 99 } 102 100 -
uspace/lib/c/include/ipc/devmap.h
re26a4633 r46b881c 34 34 #define DEVMAP_DEVMAP_H_ 35 35 36 #include <atomic.h> 37 #include <ipc/ipc.h> 38 #include <adt/list.h> 36 #include <ipc/common.h> 39 37 40 38 #define DEVMAP_NAME_MAXLEN 255 -
uspace/lib/c/include/ipc/fb.h
re26a4633 r46b881c 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #ifndef LIBC_FB_H_ 36 36 #define LIBC_FB_H_ 37 37 38 #include <ipc/ ipc.h>38 #include <ipc/common.h> 39 39 40 40 typedef enum { -
uspace/lib/c/include/ipc/icmp.h
re26a4633 r46b881c 39 39 #define LIBC_ICMP_MESSAGES_ 40 40 41 #include <ipc/ipc.h>42 41 #include <ipc/net.h> 43 42 #include <sys/types.h> 44 43 #include <sys/time.h> 45 46 44 #include <net/icmp_codes.h> 47 45 -
uspace/lib/c/include/ipc/il.h
re26a4633 r46b881c 40 40 #define LIBC_IL_MESSAGES_H_ 41 41 42 #include <ipc/ipc.h>43 42 #include <ipc/net.h> 44 43 -
uspace/lib/c/include/ipc/ip.h
re26a4633 r46b881c 39 39 #define LIBC_IP_MESSAGES_H_ 40 40 41 #include <ipc/ipc.h>42 41 #include <ipc/net.h> 43 44 42 #include <net/in.h> 45 43 #include <net/ip_codes.h> -
uspace/lib/c/include/ipc/ipc.h
re26a4633 r46b881c 33 33 */ 34 34 35 #ifndef LIBIPC_IPC_H_ 36 #define LIBIPC_IPC_H_ 37 35 #if ((defined(LIBC_ASYNC_H_)) && (!defined(LIBC_ASYNC_C_))) 36 #error Do not intermix low-level IPC interface and async framework 37 #endif 38 39 #ifndef LIBC_IPC_H_ 40 #define LIBC_IPC_H_ 41 42 #include <sys/types.h> 43 #include <ipc/common.h> 44 #include <kernel/synch/synch.h> 38 45 #include <task.h> 39 #include <kernel/ipc/ipc.h> 40 #include <kernel/ddi/irq.h> 41 #include <sys/types.h> 42 #include <kernel/synch/synch.h> 43 44 #define IPC_FLAG_BLOCKING 0x01 45 46 typedef struct { 47 sysarg_t args[IPC_CALL_LEN]; 48 sysarg_t in_task_hash; 49 sysarg_t in_phone_hash; 50 } ipc_call_t; 51 52 typedef sysarg_t ipc_callid_t; 53 54 typedef void (* ipc_async_callback_t)(void *, int, ipc_call_t *); 46 47 typedef void (*ipc_async_callback_t)(void *, int, ipc_call_t *); 55 48 56 49 /* … … 263 256 extern int ipc_connect_me_to_blocking(int, int, int, int); 264 257 extern int ipc_hangup(int); 265 extern int ipc_register_irq(int, int, int, irq_code_t *);266 extern int ipc_unregister_irq(int, int);267 258 extern int ipc_forward_fast(ipc_callid_t, int, int, sysarg_t, sysarg_t, int); 268 259 extern int ipc_forward_slow(ipc_callid_t, int, int, sysarg_t, sysarg_t, -
uspace/lib/c/include/ipc/irc.h
re26a4633 r46b881c 36 36 #define LIBC_IRC_H_ 37 37 38 #include <ipc/ ipc.h>38 #include <ipc/common.h> 39 39 40 40 typedef enum { -
uspace/lib/c/include/ipc/kbd.h
re26a4633 r46b881c 38 38 #define LIBC_IPC_KBD_H_ 39 39 40 #include <ipc/ ipc.h>40 #include <ipc/common.h> 41 41 42 42 typedef enum { -
uspace/lib/c/include/ipc/loader.h
re26a4633 r46b881c 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #ifndef LIBC_IPC_LOADER_H_ 36 36 #define LIBC_IPC_LOADER_H_ 37 37 38 #include <ipc/ ipc.h>38 #include <ipc/common.h> 39 39 40 40 typedef enum { -
uspace/lib/c/include/ipc/mouse.h
re26a4633 r46b881c 37 37 #define LIBC_IPC_MOUSE_H_ 38 38 39 #include <ipc/ ipc.h>39 #include <ipc/common.h> 40 40 41 41 typedef enum { -
uspace/lib/c/include/ipc/net.h
re26a4633 r46b881c 38 38 #define LIBC_NET_MESSAGES_H_ 39 39 40 #include <ipc/ipc.h>41 40 #include <ipc/services.h> 42 43 41 #include <net/device.h> 44 42 #include <net/packet.h> -
uspace/lib/c/include/ipc/net_net.h
re26a4633 r46b881c 39 39 #define LIBC_NET_NET_MESSAGES_H_ 40 40 41 #include <ipc/ipc.h>42 41 #include <ipc/net.h> 43 42 -
uspace/lib/c/include/ipc/netif.h
re26a4633 r46b881c 38 38 #define LIBC_NETIF_MESSAGES_H_ 39 39 40 #include <ipc/ipc.h>41 40 #include <ipc/net.h> 42 41 -
uspace/lib/c/include/ipc/nil.h
re26a4633 r46b881c 38 38 #define LIBC_NIL_MESSAGES_H_ 39 39 40 #include <ipc/ipc.h>41 40 #include <ipc/net.h> 42 41 -
uspace/lib/c/include/ipc/ns.h
re26a4633 r46b881c 33 33 */ 34 34 35 #ifndef LIB IPC_NS_H_36 #define LIB IPC_NS_H_35 #ifndef LIBC_NS_H_ 36 #define LIBC_NS_H_ 37 37 38 38 #include <sys/types.h> 39 #include <ipc/ ipc.h>39 #include <ipc/common.h> 40 40 41 41 typedef enum { … … 51 51 52 52 extern wchar_t *service_klog_share_in(size_t *); 53 extern void *service_realtime_share_in(void); 53 54 54 55 #endif -
uspace/lib/c/include/ipc/packet.h
re26a4633 r46b881c 38 38 #define LIBC_PACKET_MESSAGES_ 39 39 40 #include <ipc/ipc.h>41 40 #include <ipc/net.h> 42 41 -
uspace/lib/c/include/ipc/services.h
re26a4633 r46b881c 35 35 */ 36 36 37 #ifndef LIB IPC_SERVICES_H_38 #define LIB IPC_SERVICES_H_37 #ifndef LIBC_SERVICES_H_ 38 #define LIBC_SERVICES_H_ 39 39 40 40 typedef enum { … … 66 66 } services_t; 67 67 68 /* Memory area to be received from NS */ 69 #define SERVICE_MEM_REALTIME 1 70 #define SERVICE_MEM_KLOG 2 68 /* Memory areas to be received from NS */ 69 typedef enum { 70 SERVICE_MEM_REALTIME = 1, 71 SERVICE_MEM_KLOG = 2 72 } mem_services_t; 71 73 72 74 #endif -
uspace/lib/c/include/ipc/socket.h
re26a4633 r46b881c 38 38 #define LIBC_SOCKET_MESSAGES_H_ 39 39 40 #include <ipc/ipc.h>41 40 #include <ipc/net.h> 42 41 -
uspace/lib/c/include/ipc/tl.h
re26a4633 r46b881c 39 39 #define LIBC_TL_MESSAGES_H_ 40 40 41 #include <ipc/ipc.h>42 41 #include <ipc/net.h> 43 42 -
uspace/lib/c/include/ipc/vfs.h
re26a4633 r46b881c 36 36 #define LIBC_IPC_VFS_H_ 37 37 38 #include <ipc/ ipc.h>38 #include <ipc/common.h> 39 39 #include <sys/types.h> 40 40 #include <bool.h> -
uspace/lib/c/include/net/modules.h
re26a4633 r46b881c 43 43 44 44 #include <async.h> 45 46 #include <ipc/ipc.h>47 45 #include <ipc/services.h> 48 49 46 #include <sys/time.h> 50 47 -
uspace/lib/c/include/udebug.h
re26a4633 r46b881c 38 38 #include <kernel/udebug/udebug.h> 39 39 #include <sys/types.h> 40 #include <libarch/types.h>41 40 42 41 typedef sysarg_t thash_t; 43 42 44 int udebug_begin(int phoneid); 45 int udebug_end(int phoneid); 46 int udebug_set_evmask(int phoneid, udebug_evmask_t mask); 47 int udebug_thread_read(int phoneid, void *buffer, size_t n, 48 size_t *copied, size_t *needed); 49 int udebug_name_read(int phoneid, void *buffer, size_t n, 50 size_t *copied, size_t *needed); 51 int udebug_areas_read(int phoneid, void *buffer, size_t n, 52 size_t *copied, size_t *needed); 53 int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n); 54 int udebug_args_read(int phoneid, thash_t tid, sysarg_t *buffer); 55 int udebug_regs_read(int phoneid, thash_t tid, void *buffer); 56 int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type, 57 sysarg_t *val0, sysarg_t *val1); 58 int udebug_stop(int phoneid, thash_t tid); 43 int udebug_begin(int); 44 int udebug_end(int); 45 int udebug_set_evmask(int, udebug_evmask_t); 46 int udebug_thread_read(int, void *, size_t , size_t *, size_t *); 47 int udebug_name_read(int, void *, size_t, size_t *, size_t *); 48 int udebug_areas_read(int, void *, size_t, size_t *, size_t *); 49 int udebug_mem_read(int, void *, uintptr_t, size_t); 50 int udebug_args_read(int, thash_t, sysarg_t *); 51 int udebug_regs_read(int, thash_t, void *); 52 int udebug_go(int, thash_t, udebug_event_t *, sysarg_t *, sysarg_t *); 53 int udebug_stop(int, thash_t); 59 54 60 55 #endif -
uspace/lib/clui/tinput.h
re26a4633 r46b881c 36 36 #ifndef LIBCLUI_TINPUT_H_ 37 37 #define LIBCLUI_TINPUT_H_ 38 39 #include <ipc/ipc.h>40 38 41 39 #define HISTORY_LEN 10 -
uspace/lib/drv/generic/driver.c
re26a4633 r46b881c 186 186 pseudocode = &default_pseudocode; 187 187 188 int res = ipc_register_irq(irq, dev->handle, ctx->id, pseudocode);188 int res = register_irq(irq, dev->handle, ctx->id, pseudocode); 189 189 if (res != EOK) { 190 190 remove_interrupt_context(&interrupt_contexts, ctx); … … 199 199 interrupt_context_t *ctx = find_interrupt_context(&interrupt_contexts, 200 200 dev, irq); 201 int res = ipc_unregister_irq(irq, dev->handle);201 int res = unregister_irq(irq, dev->handle); 202 202 203 203 if (ctx != NULL) { … … 272 272 } 273 273 274 ipc_answer_0(iid, res);274 async_answer_0(iid, res); 275 275 } 276 276 … … 278 278 { 279 279 /* Accept connection */ 280 ipc_answer_0(iid, EOK);280 async_answer_0(iid, EOK); 281 281 282 282 bool cont = true; … … 293 293 break; 294 294 default: 295 ipc_answer_0(callid, ENOENT);295 async_answer_0(callid, ENOENT); 296 296 } 297 297 } … … 316 316 printf("%s: driver_connection_gen error - no device with handle" 317 317 " %" PRIun " was found.\n", driver->name, handle); 318 ipc_answer_0(iid, ENOENT);318 async_answer_0(iid, ENOENT); 319 319 return; 320 320 } … … 331 331 ret = (*dev->ops->open)(dev); 332 332 333 ipc_answer_0(iid, ret);333 async_answer_0(iid, ret); 334 334 if (ret != EOK) 335 335 return; … … 347 347 if (dev->ops != NULL && dev->ops->close != NULL) 348 348 (*dev->ops->close)(dev); 349 ipc_answer_0(callid, EOK);349 async_answer_0(callid, EOK); 350 350 return; 351 351 default: … … 368 368 "invalid interface id %d.", 369 369 driver->name, iface_idx); 370 ipc_answer_0(callid, ENOTSUP);370 async_answer_0(callid, ENOTSUP); 371 371 break; 372 372 } … … 381 381 printf("device with handle %" PRIun " has no interface " 382 382 "with id %d.\n", handle, iface_idx); 383 ipc_answer_0(callid, ENOTSUP);383 async_answer_0(callid, ENOTSUP); 384 384 break; 385 385 } … … 400 400 printf("%s: driver_connection_gen error - " 401 401 "invalid interface method.", driver->name); 402 ipc_answer_0(callid, ENOTSUP);402 async_answer_0(callid, ENOTSUP); 403 403 break; 404 404 } … … 446 446 default: 447 447 /* No such interface */ 448 ipc_answer_0(iid, ENOENT);448 async_answer_0(iid, ENOENT); 449 449 } 450 450 } -
uspace/lib/drv/generic/remote_char_dev.c
re26a4633 r46b881c 33 33 */ 34 34 35 #include <ipc/ipc.h>36 35 #include <async.h> 37 36 #include <errno.h> … … 81 80 if (!async_data_read_receive(&cid, &len)) { 82 81 /* TODO handle protocol error. */ 83 ipc_answer_0(callid, EINVAL);82 async_answer_0(callid, EINVAL); 84 83 return; 85 84 } … … 87 86 if (!char_dev_ops->read) { 88 87 async_data_read_finalize(cid, NULL, 0); 89 ipc_answer_0(callid, ENOTSUP);88 async_answer_0(callid, ENOTSUP); 90 89 return; 91 90 } … … 100 99 /* Some error occured. */ 101 100 async_data_read_finalize(cid, buf, 0); 102 ipc_answer_0(callid, ret);101 async_answer_0(callid, ret); 103 102 return; 104 103 } … … 106 105 /* The operation was successful, return the number of data read. */ 107 106 async_data_read_finalize(cid, buf, ret); 108 ipc_answer_1(callid, EOK, ret);107 async_answer_1(callid, EOK, ret); 109 108 } 110 109 … … 128 127 if (!async_data_write_receive(&cid, &len)) { 129 128 /* TODO handle protocol error. */ 130 ipc_answer_0(callid, EINVAL);129 async_answer_0(callid, EINVAL); 131 130 return; 132 131 } … … 134 133 if (!char_dev_ops->write) { 135 134 async_data_write_finalize(cid, NULL, 0); 136 ipc_answer_0(callid, ENOTSUP);135 async_answer_0(callid, ENOTSUP); 137 136 return; 138 137 } … … 148 147 if (ret < 0) { 149 148 /* Some error occured. */ 150 ipc_answer_0(callid, ret);149 async_answer_0(callid, ret); 151 150 } else { 152 151 /* … … 154 153 * written. 155 154 */ 156 ipc_answer_1(callid, EOK, ret);155 async_answer_1(callid, EOK, ret); 157 156 } 158 157 } -
uspace/lib/drv/generic/remote_hw_res.c
re26a4633 r46b881c 33 33 */ 34 34 35 #include <ipc/ipc.h>36 35 #include <async.h> 37 36 #include <errno.h> … … 62 61 63 62 if (hw_res_ops->enable_interrupt == NULL) 64 ipc_answer_0(callid, ENOTSUP);63 async_answer_0(callid, ENOTSUP); 65 64 else if (hw_res_ops->enable_interrupt(dev)) 66 ipc_answer_0(callid, EOK);65 async_answer_0(callid, EOK); 67 66 else 68 ipc_answer_0(callid, EREFUSED);67 async_answer_0(callid, EREFUSED); 69 68 } 70 69 … … 75 74 76 75 if (hw_res_ops->get_resource_list == NULL) { 77 ipc_answer_0(callid, ENOTSUP);76 async_answer_0(callid, ENOTSUP); 78 77 return; 79 78 } … … 81 80 hw_resource_list_t *hw_resources = hw_res_ops->get_resource_list(dev); 82 81 if (hw_resources == NULL){ 83 ipc_answer_0(callid, ENOENT);82 async_answer_0(callid, ENOENT); 84 83 return; 85 84 } 86 85 87 ipc_answer_1(callid, EOK, hw_resources->count);86 async_answer_1(callid, EOK, hw_resources->count); 88 87 89 88 size_t len; -
uspace/lib/drv/include/dev_iface.h
re26a4633 r46b881c 36 36 #define LIBDRV_DEV_IFACE_H_ 37 37 38 #include <ipc/common.h> 38 39 #include <ipc/dev_iface.h> 39 40 -
uspace/lib/drv/include/driver.h
re26a4633 r46b881c 36 36 #define LIBDRV_DRIVER_H_ 37 37 38 #include <kernel/ddi/irq.h> 38 39 #include <adt/list.h> 39 #include <ipc/ipc.h>40 40 #include <devman.h> 41 41 #include <ipc/devman.h> -
uspace/lib/fs/libfs.c
re26a4633 r46b881c 40 40 #include <errno.h> 41 41 #include <async.h> 42 #include <ipc/ipc.h>43 42 #include <as.h> 44 43 #include <assert.h> … … 58 57 #define answer_and_return(rid, rc) \ 59 58 do { \ 60 ipc_answer_0((rid), (rc)); \59 async_answer_0((rid), (rc)); \ 61 60 return; \ 62 61 } while (0) … … 102 101 * Ask VFS for callback connection. 103 102 */ 104 sysarg_t taskhash; 105 ipc_connect_to_me(vfs_phone, 0, 0, 0, &taskhash, ®->vfs_phonehash); 103 async_connect_to_me(vfs_phone, 0, 0, 0, conn); 106 104 107 105 /* … … 128 126 async_wait_for(req, NULL); 129 127 reg->fs_handle = (int) IPC_GET_ARG1(answer); 130 131 /*132 * Create a connection fibril to handle the callback connection.133 */134 async_new_connection(taskhash, reg->vfs_phonehash, 0, NULL, conn);135 128 136 129 /* … … 166 159 if ((IPC_GET_IMETHOD(call) != IPC_M_CONNECTION_CLONE) || 167 160 (mountee_phone < 0)) { 168 ipc_answer_0(callid, EINVAL);169 ipc_answer_0(rid, EINVAL);161 async_answer_0(callid, EINVAL); 162 async_answer_0(rid, EINVAL); 170 163 return; 171 164 } 172 165 173 166 /* Acknowledge the mountee_phone */ 174 ipc_answer_0(callid, EOK);167 async_answer_0(callid, EOK); 175 168 176 169 fs_node_t *fn; 177 170 res = ops->node_get(&fn, mp_devmap_handle, mp_fs_index); 178 171 if ((res != EOK) || (!fn)) { 179 ipc_hangup(mountee_phone);172 async_hangup(mountee_phone); 180 173 async_data_write_void(combine_rc(res, ENOENT)); 181 ipc_answer_0(rid, combine_rc(res, ENOENT));174 async_answer_0(rid, combine_rc(res, ENOENT)); 182 175 return; 183 176 } 184 177 185 178 if (fn->mp_data.mp_active) { 186 ipc_hangup(mountee_phone);179 async_hangup(mountee_phone); 187 180 (void) ops->node_put(fn); 188 181 async_data_write_void(EBUSY); 189 ipc_answer_0(rid, EBUSY);182 async_answer_0(rid, EBUSY); 190 183 return; 191 184 } … … 193 186 rc = async_req_0_0(mountee_phone, IPC_M_CONNECT_ME); 194 187 if (rc != EOK) { 195 ipc_hangup(mountee_phone);188 async_hangup(mountee_phone); 196 189 (void) ops->node_put(fn); 197 190 async_data_write_void(rc); 198 ipc_answer_0(rid, rc);191 async_answer_0(rid, rc); 199 192 return; 200 193 } … … 214 207 * Do not release the FS node so that it stays in memory. 215 208 */ 216 ipc_answer_3(rid, rc, IPC_GET_ARG1(answer), IPC_GET_ARG2(answer),209 async_answer_3(rid, rc, IPC_GET_ARG1(answer), IPC_GET_ARG2(answer), 217 210 IPC_GET_ARG3(answer)); 218 211 } … … 227 220 res = ops->node_get(&fn, mp_devmap_handle, mp_fs_index); 228 221 if ((res != EOK) || (!fn)) { 229 ipc_answer_0(rid, combine_rc(res, ENOENT));222 async_answer_0(rid, combine_rc(res, ENOENT)); 230 223 return; 231 224 } … … 236 229 if (!fn->mp_data.mp_active) { 237 230 (void) ops->node_put(fn); 238 ipc_answer_0(rid, EINVAL);231 async_answer_0(rid, EINVAL); 239 232 return; 240 233 } … … 250 243 */ 251 244 if (res == EOK) { 252 ipc_hangup(fn->mp_data.phone);245 async_hangup(fn->mp_data.phone); 253 246 fn->mp_data.mp_active = false; 254 247 fn->mp_data.fs_handle = 0; … … 260 253 261 254 (void) ops->node_put(fn); 262 ipc_answer_0(rid, res);255 async_answer_0(rid, res); 263 256 } 264 257 … … 300 293 301 294 if (cur->mp_data.mp_active) { 302 ipc_forward_slow(rid, cur->mp_data.phone, VFS_OUT_LOOKUP,295 async_forward_slow(rid, cur->mp_data.phone, VFS_OUT_LOOKUP, 303 296 next, last, cur->mp_data.devmap_handle, lflag, index, 304 297 IPC_FF_ROUTE_FROM_ME); … … 324 317 if (len + 1 == NAME_MAX) { 325 318 /* Component length overflow */ 326 ipc_answer_0(rid, ENAMETOOLONG);319 async_answer_0(rid, ENAMETOOLONG); 327 320 goto out; 328 321 } … … 358 351 next--; 359 352 360 ipc_forward_slow(rid, tmp->mp_data.phone,353 async_forward_slow(rid, tmp->mp_data.phone, 361 354 VFS_OUT_LOOKUP, next, last, tmp->mp_data.devmap_handle, 362 355 lflag, index, IPC_FF_ROUTE_FROM_ME); … … 372 365 if (next <= last) { 373 366 /* There are unprocessed components */ 374 ipc_answer_0(rid, ENOENT);367 async_answer_0(rid, ENOENT); 375 368 goto out; 376 369 } … … 380 373 /* Request to create a new link */ 381 374 if (!ops->is_directory(cur)) { 382 ipc_answer_0(rid, ENOTDIR);375 async_answer_0(rid, ENOTDIR); 383 376 goto out; 384 377 } … … 398 391 if (lflag & L_CREATE) 399 392 (void) ops->destroy(fn); 400 ipc_answer_0(rid, rc);393 async_answer_0(rid, rc); 401 394 } else { 402 395 aoff64_t size = ops->size_get(fn); 403 ipc_answer_5(rid, fs_handle,396 async_answer_5(rid, fs_handle, 404 397 devmap_handle, 405 398 ops->index_get(fn), … … 410 403 } 411 404 } else 412 ipc_answer_0(rid, ENOSPC);405 async_answer_0(rid, ENOSPC); 413 406 414 407 goto out; 415 408 } 416 409 417 ipc_answer_0(rid, ENOENT);410 async_answer_0(rid, ENOENT); 418 411 goto out; 419 412 } … … 441 434 if (lflag & (L_CREATE | L_LINK)) { 442 435 if (!ops->is_directory(cur)) { 443 ipc_answer_0(rid, ENOTDIR);436 async_answer_0(rid, ENOTDIR); 444 437 goto out; 445 438 } … … 450 443 if (ops->plb_get_char(next) == '/') { 451 444 /* More than one component */ 452 ipc_answer_0(rid, ENOENT);445 async_answer_0(rid, ENOENT); 453 446 goto out; 454 447 } … … 456 449 if (len + 1 == NAME_MAX) { 457 450 /* Component length overflow */ 458 ipc_answer_0(rid, ENAMETOOLONG);451 async_answer_0(rid, ENAMETOOLONG); 459 452 goto out; 460 453 } … … 480 473 if (lflag & L_CREATE) 481 474 (void) ops->destroy(fn); 482 ipc_answer_0(rid, rc);475 async_answer_0(rid, rc); 483 476 } else { 484 477 aoff64_t size = ops->size_get(fn); 485 ipc_answer_5(rid, fs_handle,478 async_answer_5(rid, fs_handle, 486 479 devmap_handle, 487 480 ops->index_get(fn), … … 492 485 } 493 486 } else 494 ipc_answer_0(rid, ENOSPC);487 async_answer_0(rid, ENOSPC); 495 488 496 489 goto out; 497 490 } 498 491 499 ipc_answer_0(rid, ENOENT);492 async_answer_0(rid, ENOENT); 500 493 goto out; 501 494 } … … 510 503 if (rc == EOK) { 511 504 aoff64_t size = ops->size_get(cur); 512 ipc_answer_5(rid, fs_handle, devmap_handle,505 async_answer_5(rid, fs_handle, devmap_handle, 513 506 ops->index_get(cur), LOWER32(size), UPPER32(size), 514 507 old_lnkcnt); 515 508 } else 516 ipc_answer_0(rid, rc);509 async_answer_0(rid, rc); 517 510 518 511 goto out; … … 521 514 if (((lflag & (L_CREATE | L_EXCLUSIVE)) == (L_CREATE | L_EXCLUSIVE)) || 522 515 (lflag & L_LINK)) { 523 ipc_answer_0(rid, EEXIST);516 async_answer_0(rid, EEXIST); 524 517 goto out; 525 518 } 526 519 527 520 if ((lflag & L_FILE) && (ops->is_directory(cur))) { 528 ipc_answer_0(rid, EISDIR);521 async_answer_0(rid, EISDIR); 529 522 goto out; 530 523 } 531 524 532 525 if ((lflag & L_DIRECTORY) && (ops->is_file(cur))) { 533 ipc_answer_0(rid, ENOTDIR);526 async_answer_0(rid, ENOTDIR); 534 527 goto out; 535 528 } 536 529 537 530 if ((lflag & L_ROOT) && par) { 538 ipc_answer_0(rid, EINVAL);531 async_answer_0(rid, EINVAL); 539 532 goto out; 540 533 } … … 548 541 if (rc == EOK) { 549 542 aoff64_t size = ops->size_get(cur); 550 ipc_answer_5(rid, fs_handle, devmap_handle,543 async_answer_5(rid, fs_handle, devmap_handle, 551 544 ops->index_get(cur), LOWER32(size), UPPER32(size), 552 545 ops->lnkcnt_get(cur)); 553 546 } else 554 ipc_answer_0(rid, rc);547 async_answer_0(rid, rc); 555 548 556 549 } else 557 ipc_answer_0(rid, rc);550 async_answer_0(rid, rc); 558 551 559 552 out: … … 584 577 (size != sizeof(struct stat))) { 585 578 ops->node_put(fn); 586 ipc_answer_0(callid, EINVAL);587 ipc_answer_0(rid, EINVAL);579 async_answer_0(callid, EINVAL); 580 async_answer_0(rid, EINVAL); 588 581 return; 589 582 } … … 604 597 605 598 async_data_read_finalize(callid, &stat, sizeof(struct stat)); 606 ipc_answer_0(rid, EOK);599 async_answer_0(rid, EOK); 607 600 } 608 601 … … 626 619 627 620 if (fn == NULL) { 628 ipc_answer_0(rid, ENOENT);621 async_answer_0(rid, ENOENT); 629 622 return; 630 623 } … … 632 625 rc = ops->node_open(fn); 633 626 aoff64_t size = ops->size_get(fn); 634 ipc_answer_4(rid, rc, LOWER32(size), UPPER32(size), ops->lnkcnt_get(fn),627 async_answer_4(rid, rc, LOWER32(size), UPPER32(size), ops->lnkcnt_get(fn), 635 628 (ops->is_file(fn) ? L_FILE : 0) | (ops->is_directory(fn) ? L_DIRECTORY : 0)); 636 629 -
uspace/lib/fs/libfs.h
re26a4633 r46b881c 39 39 #include <ipc/vfs.h> 40 40 #include <stdint.h> 41 #include <ipc/ipc.h>42 41 #include <async.h> 43 42 #include <devmap.h> … … 86 85 typedef struct { 87 86 int fs_handle; /**< File system handle. */ 88 sysarg_t vfs_phonehash; /**< Initial VFS phonehash. */89 87 uint8_t *plb_ro; /**< Read-only PLB view. */ 90 88 } fs_reg_t; -
uspace/lib/net/generic/generic.c
re26a4633 r46b881c 36 36 37 37 #include <generic.h> 38 39 38 #include <async.h> 40 #include <ipc/ipc.h>41 39 #include <ipc/services.h> 42 43 40 #include <net/device.h> 44 41 #include <adt/measured_strings.h> -
uspace/lib/net/generic/packet_remote.c
re26a4633 r46b881c 38 38 #include <async.h> 39 39 #include <errno.h> 40 #include <ipc/ipc.h>41 40 #include <ipc/packet.h> 42 41 #include <sys/mman.h> -
uspace/lib/net/il/arp_remote.c
re26a4633 r46b881c 41 41 #include <async.h> 42 42 #include <errno.h> 43 #include <ipc/ipc.h>44 43 #include <ipc/services.h> 45 44 #include <ipc/arp.h> -
uspace/lib/net/il/il_skel.c
re26a4633 r46b881c 54 54 * the initial IPC_M_CONNECT_ME_TO call. 55 55 */ 56 ipc_answer_0(iid, EOK);56 async_answer_0(iid, EOK); 57 57 58 58 while (true) { … … 115 115 goto out; 116 116 117 rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, NULL, NULL);117 rc = async_connect_to_me(PHONE_NS, service, 0, 0, NULL); 118 118 if (rc != EOK) 119 119 goto out; -
uspace/lib/net/include/generic.h
re26a4633 r46b881c 39 39 40 40 #include <async.h> 41 #include <ipc/ipc.h>42 41 #include <ipc/services.h> 43 42 -
uspace/lib/net/include/il_skel.h
re26a4633 r46b881c 41 41 #include <async.h> 42 42 #include <fibril_synch.h> 43 #include <ipc/ipc.h>44 43 #include <ipc/services.h> 45 44 -
uspace/lib/net/include/netif_skel.h
re26a4633 r46b881c 41 41 #include <async.h> 42 42 #include <fibril_synch.h> 43 #include <ipc/ipc.h>44 43 #include <ipc/services.h> 45 44 -
uspace/lib/net/include/nil_skel.h
re26a4633 r46b881c 41 41 #include <async.h> 42 42 #include <fibril_synch.h> 43 #include <ipc/ipc.h>44 43 #include <ipc/services.h> 45 44 -
uspace/lib/net/include/tl_skel.h
re26a4633 r46b881c 41 41 #include <async.h> 42 42 #include <fibril_synch.h> 43 #include <ipc/ipc.h>44 43 #include <ipc/services.h> 45 44 -
uspace/lib/net/netif/netif_skel.c
re26a4633 r46b881c 40 40 #include <fibril_synch.h> 41 41 #include <stdio.h> 42 #include <ipc/ipc.h>43 42 #include <ipc/services.h> 44 43 #include <ipc/netif.h> … … 369 368 * the initial IPC_M_CONNECT_ME_TO call. 370 369 */ 371 ipc_answer_0(iid, EOK);370 async_answer_0(iid, EOK); 372 371 373 372 while (true) { -
uspace/lib/net/nil/nil_skel.c
re26a4633 r46b881c 54 54 * the initial IPC_M_CONNECT_ME_TO call. 55 55 */ 56 ipc_answer_0(iid, EOK);56 async_answer_0(iid, EOK); 57 57 58 58 while (true) { … … 115 115 goto out; 116 116 117 rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, NULL, NULL);117 rc = async_connect_to_me(PHONE_NS, service, 0, 0, NULL); 118 118 if (rc != EOK) 119 119 goto out; -
uspace/lib/net/tl/icmp_remote.c
re26a4633 r46b881c 42 42 #include <async.h> 43 43 #include <errno.h> 44 #include <ipc/ipc.h>45 44 #include <ipc/services.h> 46 45 #include <ipc/icmp.h> -
uspace/lib/net/tl/tl_skel.c
re26a4633 r46b881c 54 54 * the initial IPC_M_CONNECT_ME_TO call. 55 55 */ 56 ipc_answer_0(iid, EOK);56 async_answer_0(iid, EOK); 57 57 58 58 /* Per-connection initialization */ … … 117 117 goto out; 118 118 119 rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, NULL, NULL);119 rc = async_connect_to_me(PHONE_NS, service, 0, 0, NULL); 120 120 if (rc != EOK) 121 121 goto out; -
uspace/lib/packet/generic/packet_server.c
re26a4633 r46b881c 44 44 #include <unistd.h> 45 45 #include <sys/mman.h> 46 47 #include <ipc/ipc.h>48 46 #include <ipc/packet.h> 49 47 #include <ipc/net.h> 50 51 48 #include <net/packet.h> 52 49 #include <net/packet_header.h> … … 292 289 293 290 if (!async_share_in_receive(&callid, &size)) { 294 ipc_answer_0(callid, EINVAL);291 async_answer_0(callid, EINVAL); 295 292 return EINVAL; 296 293 } 297 294 298 295 if (size != packet->length) { 299 ipc_answer_0(callid, ENOMEM);296 async_answer_0(callid, ENOMEM); 300 297 return ENOMEM; 301 298 } -
uspace/lib/packet/include/packet_server.h
re26a4633 r46b881c 45 45 #define LIBPACKET_PACKET_SERVER_H_ 46 46 47 #include <ipc/ ipc.h>47 #include <ipc/common.h> 48 48 49 49 extern int packet_server_message(ipc_callid_t, ipc_call_t *, ipc_call_t *,
Note:
See TracChangeset
for help on using the changeset viewer.
