Changeset ff381a7 in mainline for uspace/lib/c/include
- Timestamp:
- 2015-11-02T20:54:19Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d8513177
- Parents:
- 3feeab2 (diff), 5265eea4 (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/c/include
- Files:
-
- 1 added
- 1 deleted
- 19 edited
-
adt/list.h (modified) (4 diffs)
-
async.h (modified) (6 diffs)
-
cfg.h (deleted)
-
devman.h (modified) (2 diffs)
-
errno.h (modified) (1 diff)
-
helenos (added)
-
io/kio.h (modified) (1 diff)
-
ipc/devman.h (modified) (1 diff)
-
ipc/inet.h (modified) (1 diff)
-
ipc/loc.h (modified) (1 diff)
-
ipc/logger.h (modified) (1 diff)
-
ipc/services.h (modified) (2 diffs)
-
loc.h (modified) (2 diffs)
-
ns.h (modified) (1 diff)
-
stdint.h (modified) (1 diff)
-
stdio.h (modified) (2 diffs)
-
sys/statfs.h (modified) (1 diff)
-
sys/types.h (modified) (1 diff)
-
unistd.h (modified) (1 diff)
-
vfs/vfs.h (modified) (1 diff)
-
vfs/vfs_sess.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/list.h
r3feeab2 rff381a7 133 133 134 134 /** Returns true if the link is definitely part of a list. False if not sure. */ 135 static inline intlink_in_use(link_t *link)135 static inline bool link_in_use(link_t *link) 136 136 { 137 137 return link->prev != NULL && link->next != NULL; … … 237 237 * 238 238 */ 239 static inline intlist_empty(const list_t *list)239 static inline bool list_empty(const list_t *list) 240 240 { 241 241 return (list->head.next == &list->head); … … 357 357 * 358 358 */ 359 static inline link_t *list_nth(list_t *list, unsigned intn)360 { 361 unsigned intcnt = 0;359 static inline link_t *list_nth(list_t *list, unsigned long n) 360 { 361 unsigned long cnt = 0; 362 362 363 363 link_t *link = list_first(list); … … 396 396 } 397 397 398 extern intlist_member(const link_t *, const list_t *);398 extern bool list_member(const link_t *, const list_t *); 399 399 extern void list_concat(list_t *, list_t *); 400 extern unsigned intlist_count(const list_t *);400 extern unsigned long list_count(const list_t *); 401 401 402 402 #endif -
uspace/lib/c/include/async.h
r3feeab2 rff381a7 48 48 #include <abi/ddi/irq.h> 49 49 #include <abi/ipc/event.h> 50 #include <abi/ipc/interfaces.h> 50 51 51 52 typedef ipc_callid_t aid_t; 53 typedef sysarg_t port_id_t; 52 54 53 55 typedef void *(*async_client_data_ctor_t)(void); 54 56 typedef void (*async_client_data_dtor_t)(void *); 55 57 56 /** Client connection handler58 /** Port connection handler 57 59 * 58 60 * @param callid ID of incoming call or 0 if connection initiated from 59 * inside using async_c onnect_to_me()61 * inside using async_create_callback_port() 60 62 * @param call Incoming call or 0 if connection initiated from inside 61 * @param arg Local argument passed from async_new_connection() or 62 * async_connect_to_me() 63 */ 64 typedef void (*async_client_conn_t)(ipc_callid_t, ipc_call_t *, void *); 63 * using async_create_callback_port() 64 * @param arg Local argument. 65 * 66 */ 67 typedef void (*async_port_handler_t)(ipc_callid_t, ipc_call_t *, void *); 65 68 66 69 /** Notification handler */ … … 80 83 EXCHANGE_ATOMIC = 0, 81 84 85 /** Exchange management via mutual exclusion 86 * 87 * Suitable for any kind of client/server communication, 88 * but can limit parallelism. 89 * 90 */ 91 EXCHANGE_SERIALIZE = 1, 92 82 93 /** Exchange management via phone cloning 83 94 * … … 87 98 * 88 99 */ 89 EXCHANGE_PARALLEL, 90 91 /** Exchange management via mutual exclusion 92 * 93 * Suitable for any kind of client/server communication, 94 * but can limit parallelism. 95 * 96 */ 97 EXCHANGE_SERIALIZE 100 EXCHANGE_PARALLEL = 2 98 101 } exch_mgmt_t; 99 102 … … 147 150 extern void async_forget(aid_t); 148 151 149 extern fid_t async_new_connection(task_id_t, sysarg_t, ipc_callid_t,150 ipc_call_t *, async_client_conn_t, void *);151 152 152 extern void async_usleep(suseconds_t); 153 153 extern void async_create_manager(void); … … 160 160 extern void async_put_client_data_by_id(task_id_t); 161 161 162 extern void async_set_client_connection(async_client_conn_t); 162 extern int async_create_port(iface_t, async_port_handler_t, void *, 163 port_id_t *); 164 extern void async_set_fallback_port_handler(async_port_handler_t, void *); 165 extern int async_create_callback_port(async_exch_t *, iface_t, sysarg_t, 166 sysarg_t, async_port_handler_t, void *, port_id_t *); 167 163 168 extern void async_set_notification_handler_stack_size(size_t); 164 169 … … 343 348 extern async_sess_t *async_connect_me_to(exch_mgmt_t, async_exch_t *, sysarg_t, 344 349 sysarg_t, sysarg_t); 350 extern async_sess_t *async_connect_me_to_iface(async_exch_t *, iface_t, 351 sysarg_t, sysarg_t); 345 352 extern async_sess_t *async_connect_me_to_blocking(exch_mgmt_t, async_exch_t *, 346 353 sysarg_t, sysarg_t, sysarg_t); 354 extern async_sess_t *async_connect_me_to_blocking_iface(async_exch_t *, iface_t, 355 sysarg_t, sysarg_t); 347 356 extern async_sess_t *async_connect_kbox(task_id_t); 348 357 349 extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t, 350 async_client_conn_t, void *); 358 extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t); 351 359 352 360 extern int async_hangup(async_sess_t *); -
uspace/lib/c/include/devman.h
r3feeab2 rff381a7 42 42 #include <stdbool.h> 43 43 44 extern async_exch_t *devman_exchange_begin_blocking( devman_interface_t);45 extern async_exch_t *devman_exchange_begin( devman_interface_t);44 extern async_exch_t *devman_exchange_begin_blocking(iface_t); 45 extern async_exch_t *devman_exchange_begin(iface_t); 46 46 extern void devman_exchange_end(async_exch_t *); 47 47 … … 53 53 extern int devman_drv_fun_offline(devman_handle_t); 54 54 55 extern async_sess_t *devman_device_connect(exch_mgmt_t, devman_handle_t, 56 unsigned int); 57 extern async_sess_t *devman_parent_device_connect(exch_mgmt_t, devman_handle_t, 55 extern async_sess_t *devman_device_connect(devman_handle_t, unsigned int); 56 extern async_sess_t *devman_parent_device_connect(devman_handle_t, 58 57 unsigned int); 59 58 -
uspace/lib/c/include/errno.h
r3feeab2 rff381a7 47 47 #define ENOTDIR (-258) 48 48 #define ENOSPC (-259) 49 #define EEXIST (-260)50 49 #define ENOTEMPTY (-261) 51 50 #define EBADF (-262) 52 #define ERANGE (-263) 53 #define EXDEV (-264) 54 #define EIO (-265) 55 #define EMLINK (-266) 56 #define ENXIO (-267) 51 #define EDOM (-263) 52 #define ERANGE (-264) 53 #define EXDEV (-265) 54 #define EIO (-266) 55 #define EMLINK (-267) 56 #define ENXIO (-268) 57 57 58 58 /** Bad checksum. */ -
uspace/lib/c/include/io/kio.h
r3feeab2 rff381a7 40 40 #include <io/verify.h> 41 41 42 extern size_t kio_write(const void *, size_t);42 extern int kio_write(const void *, size_t, size_t *); 43 43 extern void kio_update(void); 44 44 extern void kio_command(const void *, size_t); -
uspace/lib/c/include/ipc/devman.h
r3feeab2 rff381a7 141 141 142 142 typedef enum { 143 DEVMAN_DRIVER = 1,144 DEVMAN_CLIENT,145 DEVMAN_CONNECT_TO_DEVICE,146 DEVMAN_CONNECT_FROM_LOC,147 DEVMAN_CONNECT_TO_PARENTS_DEVICE148 } devman_interface_t;149 150 typedef enum {151 143 DEVMAN_DRIVER_REGISTER = IPC_FIRST_USER_METHOD, 152 144 DEVMAN_ADD_FUNCTION, -
uspace/lib/c/include/ipc/inet.h
r3feeab2 rff381a7 37 37 38 38 #include <ipc/common.h> 39 40 /** Inet ports */41 typedef enum {42 /** Default port */43 INET_PORT_DEFAULT = 1,44 /** Configuration port */45 INET_PORT_CFG,46 /** Ping service port */47 INET_PORT_PING,48 /** Ping6 service port */49 INET_PORT_PING650 } inet_port_t;51 39 52 40 /** Requests on Inet default port */ -
uspace/lib/c/include/ipc/loc.h
r3feeab2 rff381a7 76 76 } loc_event_t; 77 77 78 /** Ports provided by location service.79 *80 * Every process that connects to loc must ask one of following81 * ports, otherwise connection will be refused.82 *83 */84 typedef enum {85 /** Service supplier (server) port */86 LOC_PORT_SUPPLIER = 1,87 /** Service consumer (client) port */88 LOC_PORT_CONSUMER,89 /** Create new connection to instance of device that90 is specified by second argument of call. */91 LOC_CONNECT_TO_SERVICE92 } loc_interface_t;93 94 78 typedef struct { 95 79 service_id_t id; -
uspace/lib/c/include/ipc/logger.h
r3feeab2 rff381a7 69 69 } logger_writer_request_t; 70 70 71 typedef enum {72 /** Interface for controlling logger behavior. */73 LOGGER_INTERFACE_CONTROL,74 /** Interface for servers writing to the log. */75 LOGGER_INTERFACE_WRITER76 } logger_interface_t;77 78 71 #endif 79 72 -
uspace/lib/c/include/ipc/services.h
r3feeab2 rff381a7 38 38 #define LIBC_SERVICES_H_ 39 39 40 #include <fourcc.h> 40 #include <sys/types.h> 41 #include <abi/fourcc.h> 41 42 42 43 typedef enum { 43 44 SERVICE_NONE = 0, 44 SERVICE_LOAD = FOURCC('l', 'o', 'a', 'd'),45 SERVICE_LOADER = FOURCC('l', 'o', 'a', 'd'), 45 46 SERVICE_VFS = FOURCC('v', 'f', 's', ' '), 46 47 SERVICE_LOC = FOURCC('l', 'o', 'c', ' '), … … 49 50 SERVICE_IRC = FOURCC('i', 'r', 'c', ' '), 50 51 SERVICE_CLIPBOARD = FOURCC('c', 'l', 'i', 'p'), 51 } service s_t;52 } service_t; 52 53 53 #define SERVICE_NAME_CORECFG "corecfg" 54 #define SERVICE_NAME_DHCP "net/dhcp" 55 #define SERVICE_NAME_DNSR "net/dnsr" 56 #define SERVICE_NAME_INET "net/inet" 57 #define SERVICE_NAME_INETCFG "net/inetcfg" 58 #define SERVICE_NAME_INETPING "net/inetping" 59 #define SERVICE_NAME_INETPING6 "net/inetping6" 60 #define SERVICE_NAME_NETCONF "net/netconf" 61 #define SERVICE_NAME_UDP "net/udp" 62 #define SERVICE_NAME_TCP "net/tcp" 63 #define SERVICE_NAME_VBD "vbd" 64 #define SERVICE_NAME_VOLSRV "volsrv" 54 #define SERVICE_NAME_CORECFG "corecfg" 55 #define SERVICE_NAME_DHCP "net/dhcp" 56 #define SERVICE_NAME_DNSR "net/dnsr" 57 #define SERVICE_NAME_INET "net/inet" 58 #define SERVICE_NAME_NETCONF "net/netconf" 59 #define SERVICE_NAME_UDP "net/udp" 60 #define SERVICE_NAME_TCP "net/tcp" 61 #define SERVICE_NAME_VBD "vbd" 62 #define SERVICE_NAME_VOLSRV "volsrv" 65 63 66 64 #endif -
uspace/lib/c/include/loc.h
r3feeab2 rff381a7 42 42 typedef void (*loc_cat_change_cb_t)(void); 43 43 44 extern async_exch_t *loc_exchange_begin_blocking( loc_interface_t);45 extern async_exch_t *loc_exchange_begin( loc_interface_t);44 extern async_exch_t *loc_exchange_begin_blocking(iface_t); 45 extern async_exch_t *loc_exchange_begin(iface_t); 46 46 extern void loc_exchange_end(async_exch_t *); 47 47 48 48 extern int loc_server_register(const char *); 49 49 extern int loc_service_register(const char *, service_id_t *); 50 extern int loc_service_register_with_iface(const char *, service_id_t *,51 sysarg_t);52 50 extern int loc_service_unregister(service_id_t); 53 51 extern int loc_service_add_to_cat(service_id_t, category_id_t); … … 65 63 extern loc_object_type_t loc_id_probe(service_id_t); 66 64 67 extern async_sess_t *loc_service_connect( exch_mgmt_t, service_id_t,65 extern async_sess_t *loc_service_connect(service_id_t, iface_t, 68 66 unsigned int); 69 67 -
uspace/lib/c/include/ns.h
r3feeab2 rff381a7 41 41 #include <async.h> 42 42 43 extern int service_register(sysarg_t); 44 extern async_sess_t *service_connect(exch_mgmt_t, services_t, sysarg_t, sysarg_t); 45 extern async_sess_t *service_connect_blocking(exch_mgmt_t, services_t, sysarg_t, 46 sysarg_t); 47 extern async_sess_t *service_bind(services_t, sysarg_t, sysarg_t, sysarg_t, 48 async_client_conn_t); 43 extern int service_register(service_t); 44 extern async_sess_t *service_connect(service_t, iface_t, sysarg_t); 45 extern async_sess_t *service_connect_blocking(service_t, iface_t, sysarg_t); 49 46 50 47 extern int ns_ping(void); -
uspace/lib/c/include/stdint.h
r3feeab2 rff381a7 60 60 #define UINT64_MAX UINT64_C(0xFFFFFFFFFFFFFFFF) 61 61 62 #include <libarch/ types.h>62 #include <libarch/stdint.h> 63 63 64 64 /* off64_t */ -
uspace/lib/c/include/stdio.h
r3feeab2 rff381a7 109 109 extern int puts(const char *); 110 110 111 extern int ungetc(int, FILE *); 112 111 113 /* Formatted string output functions */ 112 114 extern int fprintf(FILE *, const char*, ...) … … 132 134 extern FILE *fopen(const char *, const char *); 133 135 extern FILE *fdopen(int, const char *); 136 extern FILE *freopen(const char *, const char *, FILE *); 134 137 extern int fclose(FILE *); 135 138 -
uspace/lib/c/include/sys/statfs.h
r3feeab2 rff381a7 46 46 47 47 extern int statfs(const char *, struct statfs *); 48 48 49 #endif 49 50 -
uspace/lib/c/include/sys/types.h
r3feeab2 rff381a7 46 46 typedef uint64_t aoff64_t; 47 47 48 typedef uint32_t fourcc_t; 49 48 50 typedef volatile uint8_t ioport8_t; 49 51 typedef volatile uint16_t ioport16_t; -
uspace/lib/c/include/unistd.h
r3feeab2 rff381a7 63 63 extern ssize_t read(int, void *, size_t); 64 64 65 extern ssize_t read_all(int, void *, size_t);66 extern ssize_t write_all(int, const void *, size_t);67 68 65 extern off64_t lseek(int, off64_t, int); 69 66 extern int ftruncate(int, aoff64_t); -
uspace/lib/c/include/vfs/vfs.h
r3feeab2 rff381a7 50 50 51 51 52 extern char * absolutize(const char *, size_t *);52 extern char *vfs_absolutize(const char *, size_t *); 53 53 54 extern int mount(const char *, const char *, const char *, const char *,54 extern int vfs_mount(const char *, const char *, const char *, const char *, 55 55 unsigned int, unsigned int); 56 extern int unmount(const char *);56 extern int vfs_unmount(const char *); 57 57 58 extern int fhandle(FILE *, int *);58 extern int vfs_fhandle(FILE *, int *); 59 59 60 extern int fd_wait(void);61 extern int get_mtab_list(list_t *mtab_list);60 extern int vfs_fd_wait(void); 61 extern int vfs_get_mtab_list(list_t *mtab_list); 62 62 63 63 extern async_exch_t *vfs_exchange_begin(void); 64 64 extern void vfs_exchange_end(async_exch_t *); 65 65 66 #endif 66 67 -
uspace/lib/c/include/vfs/vfs_sess.h
r3feeab2 rff381a7 39 39 #include <stdio.h> 40 40 41 extern async_sess_t * fd_session(exch_mgmt_t, int);42 extern async_sess_t * fsession(exch_mgmt_t, FILE *);41 extern async_sess_t *vfs_fd_session(int, iface_t); 42 extern async_sess_t *vfs_fsession(FILE *, iface_t); 43 43 44 44 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
