Changeset 64d2b10 in mainline for uspace/lib/c/include
- Timestamp:
- 2011-01-29T11:35:03Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ffa2c8ef
- Parents:
- 2c577e0b
- Location:
- uspace/lib/c/include
- Files:
-
- 1 added
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/async.h
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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/event.h
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 33 33 */ 34 34 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 35 39 #ifndef LIBC_IPC_H_ 36 40 #define LIBC_IPC_H_ 37 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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/packet.h
r2c577e0b r64d2b10 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/socket.h
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
r2c577e0b r64d2b10 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
Note:
See TracChangeset
for help on using the changeset viewer.