Changeset 4c53333 in mainline for uspace/lib/c/include
- Timestamp:
- 2013-07-11T08:21:10Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64e63ce1
- Parents:
- 80445cf (diff), c8bb1633 (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:
-
- 31 added
- 58 edited
- 5 moved
-
adt/hash.h (added)
-
adt/hash_table.h (modified) (2 diffs)
-
adt/list.h (modified) (1 diff)
-
as.h (modified) (1 diff)
-
async.h (modified) (3 diffs)
-
atomicdflt.h (modified) (1 diff)
-
bd.h (added)
-
bd_srv.h (added)
-
bitops.h (modified) (1 diff)
-
cc.h (added)
-
cfg.h (modified) (1 diff)
-
ddi.h (modified) (2 diffs)
-
device/ahci.h (added)
-
device/battery_dev.h (added)
-
device/clock_dev.h (added)
-
device/graph_dev.h (added)
-
device/hw_res.h (modified) (1 diff)
-
device/hw_res_parsed.h (modified) (2 diffs)
-
devman.h (modified) (2 diffs)
-
double_to_str.h (added)
-
errno.h (modified) (1 diff)
-
fibril.h (modified) (1 diff)
-
fibril_synch.h (modified) (1 diff)
-
ieee_double.h (added)
-
inet/addr.h (added)
-
inet/dnsr.h (added)
-
inet/inet.h (modified) (1 diff)
-
inet/inetcfg.h (modified) (1 diff)
-
inet/inetping.h (modified) (2 diffs)
-
inet/inetping6.h (added)
-
inet/iplink.h (modified) (4 diffs)
-
inet/iplink_srv.h (modified) (3 diffs)
-
io/charfield.h (moved) (moved from uspace/lib/fb/screenbuffer.h ) (6 diffs)
-
io/chargrid.h (added)
-
io/con_srv.h (moved) (moved from uspace/lib/c/include/adt/hash_set.h ) (2 diffs)
-
io/concaps.h (added)
-
io/cons_event.h (added)
-
io/console.h (modified) (3 diffs)
-
io/input.h (added)
-
io/kbd_event.h (added)
-
io/klog.h (modified) (1 diff)
-
io/log.h (modified) (1 diff)
-
io/logctl.h (added)
-
io/mode.h (added)
-
io/output.h (added)
-
io/pixel.h (added)
-
io/pixelmap.h (added)
-
io/pos_event.h (added)
-
io/verify.h (added)
-
io/visualizer.h (moved) (moved from uspace/lib/c/include/net/modules.h ) (2 diffs)
-
io/window.h (added)
-
ipc/console.h (modified) (1 diff)
-
ipc/dev_iface.h (modified) (2 diffs)
-
ipc/devman.h (modified) (1 diff)
-
ipc/dnsr.h (added)
-
ipc/graph.h (added)
-
ipc/inet.h (modified) (2 diffs)
-
ipc/input.h (modified) (1 diff)
-
ipc/ipc.h (modified) (3 diffs)
-
ipc/loc.h (modified) (1 diff)
-
ipc/logger.h (added)
-
ipc/mouseev.h (modified) (1 diff)
-
ipc/output.h (added)
-
ipc/services.h (modified) (2 diffs)
-
ipc/vfs.h (modified) (1 diff)
-
ipc/window.h (added)
-
loc.h (modified) (2 diffs)
-
macros.h (modified) (2 diffs)
-
mem.h (modified) (1 diff)
-
net/in.h (modified) (2 diffs)
-
net/in6.h (modified) (2 diffs)
-
net/inet.h (modified) (1 diff)
-
net/ip_protocols.h (modified) (1 diff)
-
net/socket_codes.h (modified) (2 diffs)
-
nic/nic.h (modified) (1 diff)
-
ns.h (modified) (1 diff)
-
rtld/dynamic.h (modified) (1 diff)
-
setjmp.h (modified) (2 diffs)
-
sort.h (modified) (1 diff)
-
stack.h (moved) (moved from uspace/lib/c/include/bool.h ) (2 diffs)
-
stacktrace.h (modified) (1 diff)
-
stats.h (modified) (1 diff)
-
stdarg.h (modified) (1 diff)
-
stdbool.h (moved) (moved from uspace/lib/posix/stdbool.h ) (2 diffs)
-
stdio.h (modified) (3 diffs)
-
str.h (modified) (5 diffs)
-
sys/mman.h (modified) (1 diff)
-
sys/stat.h (modified) (1 diff)
-
sys/time.h (modified) (4 diffs)
-
sys/types.h (modified) (1 diff)
-
sysinfo.h (modified) (1 diff)
-
task.h (modified) (2 diffs)
-
tls.h (modified) (1 diff)
-
unistd.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/hash_table.h
r80445cf r4c53333 1 1 /* 2 2 * Copyright (c) 2006 Jakub Jermar 3 * Copyright (c) 2012 Adam Hraska 4 * 3 5 * All rights reserved. 4 6 * … … 38 40 #include <adt/list.h> 39 41 #include <unistd.h> 40 #include <bool.h> 42 #include <stdbool.h> 43 #include <macros.h> 41 44 42 typedef unsigned long hash_count_t; 43 typedef unsigned long hash_index_t; 45 /** Opaque hash table link type. */ 46 typedef struct ht_link { 47 link_t link; 48 } ht_link_t; 44 49 45 50 /** Set of operations for hash table. */ 46 51 typedef struct { 47 /** Hash function. 48 * 49 * @param key Array of keys needed to compute hash index. 50 * All keys must be passed. 51 * 52 * @return Index into hash table. 53 * 54 */ 55 hash_index_t (*hash)(unsigned long key[]); 52 /** Returns the hash of the key stored in the item (ie its lookup key). */ 53 size_t (*hash)(const ht_link_t *item); 56 54 57 /** Hash table item comparison function. 58 * 59 * @param key Array of keys that will be compared with item. It is 60 * not necessary to pass all keys. 61 * 62 * @return True if the keys match, false otherwise. 63 * 64 */ 65 int (*compare)(unsigned long key[], hash_count_t keys, link_t *item); 55 /** Returns the hash of the key. */ 56 size_t (*key_hash)(void *key); 66 57 58 /** True if the items are equal (have the same lookup keys). */ 59 bool (*equal)(const ht_link_t *item1, const ht_link_t *item2); 60 61 /** Returns true if the key is equal to the item's lookup key. */ 62 bool (*key_equal)(void *key, const ht_link_t *item); 63 67 64 /** Hash table item removal callback. 65 * 66 * Must not invoke any mutating functions of the hash table. 68 67 * 69 68 * @param item Item that was removed from the hash table. 70 *71 69 */ 72 void (*remove_callback)( link_t *item);73 } hash_table_op erations_t;70 void (*remove_callback)(ht_link_t *item); 71 } hash_table_ops_t; 74 72 75 73 /** Hash table structure. */ 76 74 typedef struct { 77 list_t *entry; 78 hash_count_t entries; 79 hash_count_t max_keys; 80 hash_table_operations_t *op; 75 hash_table_ops_t *op; 76 list_t *bucket; 77 size_t bucket_cnt; 78 size_t full_item_cnt; 79 size_t item_cnt; 80 size_t max_load; 81 bool apply_ongoing; 81 82 } hash_table_t; 82 83 83 #define hash_table_get_inst ance(item, type, member) \84 list_get_instance((item), type, member)84 #define hash_table_get_inst(item, type, member) \ 85 member_to_inst((item), type, member) 85 86 86 extern bool hash_table_create(hash_table_t *, hash_count_t, hash_count_t, 87 hash_table_operations_t *); 87 extern bool hash_table_create(hash_table_t *, size_t, size_t, 88 hash_table_ops_t *); 89 extern void hash_table_destroy(hash_table_t *); 90 91 extern bool hash_table_empty(hash_table_t *); 92 extern size_t hash_table_size(hash_table_t *); 93 88 94 extern void hash_table_clear(hash_table_t *); 89 extern void hash_table_insert(hash_table_t *, unsigned long [], link_t *); 90 extern link_t *hash_table_find(hash_table_t *, unsigned long []); 91 extern void hash_table_remove(hash_table_t *, unsigned long [], hash_count_t); 92 extern void hash_table_destroy(hash_table_t *); 93 extern void hash_table_apply(hash_table_t *, void (*)(link_t *, void *), 94 void *); 95 extern void hash_table_insert(hash_table_t *, ht_link_t *); 96 extern bool hash_table_insert_unique(hash_table_t *, ht_link_t *); 97 extern ht_link_t *hash_table_find(const hash_table_t *, void *); 98 extern ht_link_t *hash_table_find_next(const hash_table_t *, ht_link_t *); 99 extern size_t hash_table_remove(hash_table_t *, void *); 100 extern void hash_table_remove_item(hash_table_t *, ht_link_t *); 101 extern void hash_table_apply(hash_table_t *, bool (*)(ht_link_t *, void *), 102 void *); 103 95 104 96 105 #endif -
uspace/lib/c/include/adt/list.h
r80445cf r4c53333 71 71 iterator != &(list).head; iterator = iterator->next) 72 72 73 /** Unlike list_foreach(), allows removing items while traversing a list. 74 * 75 * @code 76 * list_t mylist; 77 * typedef struct item { 78 * int value; 79 * link_t item_link; 80 * } item_t; 81 * 82 * //.. 83 * 84 * // Print each list element's value and remove the element from the list. 85 * list_foreach_safe(mylist, cur_link, next_link) { 86 * item_t *cur_item = list_get_instance(cur_link, item_t, item_link); 87 * printf("%d\n", cur_item->value); 88 * list_remove(cur_link); 89 * } 90 * @endcode 91 * 92 * @param list List to traverse. 93 * @param iterator Iterator to the current element of the list. 94 * The item this iterator points may be safely removed 95 * from the list. 96 * @param next_iter Iterator to the next element of the list. 97 */ 98 #define list_foreach_safe(list, iterator, next_iter) \ 99 for (link_t *iterator = (list).head.next, \ 100 *next_iter = iterator->next; \ 101 iterator != &(list).head; \ 102 iterator = next_iter, next_iter = iterator->next) 103 73 104 #define assert_link_not_used(link) \ 74 105 assert(((link)->prev == NULL) && ((link)->next == NULL)) 106 107 /** Returns true if the link is definitely part of a list. False if not sure. */ 108 static inline int link_in_use(link_t *link) 109 { 110 return link->prev != NULL && link->next != NULL; 111 } 75 112 76 113 /** Initialize doubly-linked circular list link -
uspace/lib/c/include/as.h
r80445cf r4c53333 41 41 #include <libarch/config.h> 42 42 43 #define AS_AREA_ANY ((void *) -1) 44 #define AS_MAP_FAILED ((void *) -1) 45 43 46 static inline size_t SIZE2PAGES(size_t size) 44 47 { -
uspace/lib/c/include/async.h
r80445cf r4c53333 44 44 #include <sys/time.h> 45 45 #include <atomic.h> 46 #include < bool.h>46 #include <stdbool.h> 47 47 #include <task.h> 48 48 … … 156 156 extern void async_set_client_connection(async_client_conn_t); 157 157 extern void async_set_interrupt_received(async_interrupt_handler_t); 158 extern void async_set_interrupt_handler_stack_size(size_t); 158 159 159 160 /* … … 321 322 sysarg_t *, sysarg_t *); 322 323 323 extern async_sess_t *async_c onnect_me(exch_mgmt_t, async_exch_t *);324 extern async_sess_t *async_clone_establish(exch_mgmt_t, async_exch_t *); 324 325 extern async_sess_t *async_connect_me_to(exch_mgmt_t, async_exch_t *, sysarg_t, 325 326 sysarg_t, sysarg_t); -
uspace/lib/c/include/atomicdflt.h
r80445cf r4c53333 41 41 42 42 #include <stdint.h> 43 #include < bool.h>43 #include <stdbool.h> 44 44 45 45 typedef struct atomic { -
uspace/lib/c/include/bitops.h
r80445cf r4c53333 107 107 } 108 108 109 extern int __popcountsi2(int); 110 109 111 #endif 110 112 -
uspace/lib/c/include/cfg.h
r80445cf r4c53333 41 41 #include <adt/list.h> 42 42 #include <sys/types.h> 43 #include < bool.h>43 #include <stdbool.h> 44 44 45 45 /** -
uspace/lib/c/include/ddi.h
r80445cf r4c53333 36 36 #define LIBC_DDI_H_ 37 37 38 #include <stdbool.h> 38 39 #include <sys/types.h> 40 #include <sys/time.h> 39 41 #include <abi/ddi/irq.h> 40 42 #include <task.h> … … 50 52 extern int dmamem_unmap_anonymous(void *); 51 53 52 extern int iospace_enable(task_id_t, void *, unsigned long);53 54 extern int pio_enable(void *, size_t, void **); 55 56 typedef void (*trace_fnc)(const volatile void *place, uint32_t val, 57 volatile void* base, size_t size, void *data, bool write); 58 59 extern int pio_trace_enable(void *, size_t, trace_fnc, void *); 60 extern void pio_trace_log(const volatile void *, uint32_t val, bool write); 61 extern void pio_trace_disable(void *); 62 63 extern void pio_write_8(ioport8_t *, uint8_t); 64 extern void pio_write_16(ioport16_t *, uint16_t); 65 extern void pio_write_32(ioport32_t *, uint32_t); 66 67 extern uint8_t pio_read_8(const ioport8_t *); 68 extern uint16_t pio_read_16(const ioport16_t *); 69 extern uint32_t pio_read_32(const ioport32_t *); 70 71 static inline uint8_t pio_change_8( 72 ioport8_t *reg, uint8_t val, uint8_t mask, useconds_t delay) 73 { 74 uint8_t v = pio_read_8(reg); 75 udelay(delay); 76 pio_write_8(reg, (v & ~mask) | val); 77 return v; 78 } 79 80 static inline uint16_t pio_change_16( 81 ioport16_t *reg, uint16_t val, uint16_t mask, useconds_t delay) 82 { 83 uint16_t v = pio_read_16(reg); 84 udelay(delay); 85 pio_write_16(reg, (v & ~mask) | val); 86 return v; 87 } 88 89 static inline uint32_t pio_change_32( 90 ioport32_t *reg, uint32_t val, uint32_t mask, useconds_t delay) 91 { 92 uint32_t v = pio_read_32(reg); 93 udelay(delay); 94 pio_write_32(reg, (v & ~mask) | val); 95 return v; 96 } 97 98 static inline uint8_t pio_set_8(ioport8_t *r, uint8_t v, useconds_t d) 99 { 100 return pio_change_8(r, v, 0, d); 101 } 102 static inline uint16_t pio_set_16(ioport16_t *r, uint16_t v, useconds_t d) 103 { 104 return pio_change_16(r, v, 0, d); 105 } 106 static inline uint32_t pio_set_32(ioport32_t *r, uint32_t v, useconds_t d) 107 { 108 return pio_change_32(r, v, 0, d); 109 } 110 111 static inline uint8_t pio_clear_8(ioport8_t *r, uint8_t v, useconds_t d) 112 { 113 return pio_change_8(r, 0, v, d); 114 } 115 static inline uint16_t pio_clear_16(ioport16_t *r, uint16_t v, useconds_t d) 116 { 117 return pio_change_16(r, 0, v, d); 118 } 119 static inline uint32_t pio_clear_32(ioport32_t *r, uint32_t v, useconds_t d) 120 { 121 return pio_change_32(r, 0, v, d); 122 } 54 123 55 124 extern int irq_register(int, int, int, irq_code_t *); -
uspace/lib/c/include/device/hw_res.h
r80445cf r4c53333 38 38 #include <ipc/dev_iface.h> 39 39 #include <async.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 42 42 #define DMA_MODE_ON_DEMAND 0 -
uspace/lib/c/include/device/hw_res_parsed.h
r80445cf r4c53333 127 127 free(list->dma_channels.channels); 128 128 129 bzero(list, sizeof(hw_res_list_parsed_t));129 memset(list, 0, sizeof(hw_res_list_parsed_t)); 130 130 } 131 131 … … 136 136 static inline void hw_res_list_parsed_init(hw_res_list_parsed_t *list) 137 137 { 138 bzero(list, sizeof(hw_res_list_parsed_t));138 memset(list, 0, sizeof(hw_res_list_parsed_t)); 139 139 } 140 140 -
uspace/lib/c/include/devman.h
r80445cf r4c53333 40 40 #include <ipc/loc.h> 41 41 #include <async.h> 42 #include < bool.h>42 #include <stdbool.h> 43 43 44 44 extern async_exch_t *devman_exchange_begin_blocking(devman_interface_t); … … 64 64 size_t *); 65 65 extern int devman_fun_get_name(devman_handle_t, char *, size_t); 66 extern int devman_fun_get_driver_name(devman_handle_t, char *, size_t); 66 67 extern int devman_fun_get_path(devman_handle_t, char *, size_t); 67 68 extern int devman_fun_online(devman_handle_t); -
uspace/lib/c/include/errno.h
r80445cf r4c53333 37 37 38 38 #include <abi/errno.h> 39 #include <fibril.h>40 39 41 40 #define errno (*(__errno())) -
uspace/lib/c/include/fibril.h
r80445cf r4c53333 86 86 extern void context_restore(context_t *ctx) __attribute__((noreturn)); 87 87 88 extern fid_t fibril_create(int (*func)(void *), void *arg); 88 #define FIBRIL_DFLT_STK_SIZE 0 89 90 #define fibril_create(func, arg) \ 91 fibril_create_generic((func), (arg), FIBRIL_DFLT_STK_SIZE) 92 extern fid_t fibril_create_generic(int (*func)(void *), void *arg, size_t); 93 extern void fibril_destroy(fid_t fid); 89 94 extern fibril_t *fibril_setup(void); 90 95 extern void fibril_teardown(fibril_t *f); -
uspace/lib/c/include/fibril_synch.h
r80445cf r4c53333 40 40 #include <libarch/tls.h> 41 41 #include <sys/time.h> 42 #include < bool.h>42 #include <stdbool.h> 43 43 44 44 typedef struct { -
uspace/lib/c/include/inet/inet.h
r80445cf r4c53333 36 36 #define LIBC_INET_INET_H_ 37 37 38 #include <inet/addr.h> 38 39 #include <sys/types.h> 39 40 40 41 #define INET_TTL_MAX 255 41 42 typedef struct {43 uint32_t ipv4;44 } inet_addr_t;45 42 46 43 typedef struct { -
uspace/lib/c/include/inet/inetcfg.h
r80445cf r4c53333 38 38 #include <inet/inet.h> 39 39 #include <sys/types.h> 40 41 /** Network address */42 typedef struct {43 /** Address */44 uint32_t ipv4;45 /** Number of valid bits in @c ipv4 */46 int bits;47 } inet_naddr_t;48 40 49 41 /** Address object info */ -
uspace/lib/c/include/inet/inetping.h
r80445cf r4c53333 40 40 41 41 typedef struct { 42 inet_addr_t src;43 inet_addr_t dest;42 uint32_t src; 43 uint32_t dest; 44 44 uint16_t seq_no; 45 45 void *data; … … 53 53 extern int inetping_init(inetping_ev_ops_t *); 54 54 extern int inetping_send(inetping_sdu_t *); 55 extern int inetping_get_srcaddr(inet_addr_t *, inet_addr_t *); 56 55 extern int inetping_get_srcaddr(uint32_t, uint32_t *); 57 56 58 57 #endif -
uspace/lib/c/include/inet/iplink.h
r80445cf r4c53333 38 38 #include <async.h> 39 39 #include <sys/types.h> 40 #include <inet/addr.h> 40 41 41 42 struct iplink_ev_ops; … … 46 47 } iplink_t; 47 48 48 typedef struct { 49 uint32_t ipv4; 50 } iplink_addr_t; 51 52 /** IP link Service Data Unit */ 49 /** Internet link Service Data Unit */ 53 50 typedef struct { 54 51 /** Local source address */ 55 i plink_addr_t lsrc;52 inet_addr_t src; 56 53 /** Local destination address */ 57 i plink_addr_t ldest;54 inet_addr_t dest; 58 55 /** Serialized IP packet */ 59 56 void *data; … … 62 59 } iplink_sdu_t; 63 60 61 /** Internet link receive Service Data Unit */ 62 typedef struct { 63 /** Serialized datagram */ 64 void *data; 65 /** Size of @c data in bytes */ 66 size_t size; 67 } iplink_recv_sdu_t; 68 64 69 typedef struct iplink_ev_ops { 65 int (*recv)(iplink_t *, iplink_ sdu_t *);70 int (*recv)(iplink_t *, iplink_recv_sdu_t *, uint16_t); 66 71 } iplink_ev_ops_t; 67 72 … … 69 74 extern void iplink_close(iplink_t *); 70 75 extern int iplink_send(iplink_t *, iplink_sdu_t *); 71 extern int iplink_addr_add(iplink_t *, i plink_addr_t *);72 extern int iplink_addr_remove(iplink_t *, i plink_addr_t *);76 extern int iplink_addr_add(iplink_t *, inet_addr_t *); 77 extern int iplink_addr_remove(iplink_t *, inet_addr_t *); 73 78 extern int iplink_get_mtu(iplink_t *, size_t *); 74 79 -
uspace/lib/c/include/inet/iplink_srv.h
r80445cf r4c53333 38 38 #include <async.h> 39 39 #include <fibril_synch.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 #include <sys/types.h> 42 #include <inet/addr.h> 43 #include <inet/iplink.h> 42 44 43 45 struct iplink_ops; … … 51 53 } iplink_srv_t; 52 54 53 typedef struct {54 uint32_t ipv4;55 } iplink_srv_addr_t;56 57 /** IP link Service Data Unit */58 typedef struct {59 /** Local source address */60 iplink_srv_addr_t lsrc;61 /** Local destination address */62 iplink_srv_addr_t ldest;63 /** Serialized IP packet */64 void *data;65 /** Size of @c data in bytes */66 size_t size;67 } iplink_srv_sdu_t;68 69 55 typedef struct iplink_ops { 70 56 int (*open)(iplink_srv_t *); 71 57 int (*close)(iplink_srv_t *); 72 int (*send)(iplink_srv_t *, iplink_s rv_sdu_t *);58 int (*send)(iplink_srv_t *, iplink_sdu_t *); 73 59 int (*get_mtu)(iplink_srv_t *, size_t *); 74 int (*addr_add)(iplink_srv_t *, i plink_srv_addr_t *);75 int (*addr_remove)(iplink_srv_t *, i plink_srv_addr_t *);60 int (*addr_add)(iplink_srv_t *, inet_addr_t *); 61 int (*addr_remove)(iplink_srv_t *, inet_addr_t *); 76 62 } iplink_ops_t; 77 63 … … 79 65 80 66 extern int iplink_conn(ipc_callid_t, ipc_call_t *, void *); 81 extern int iplink_ev_recv(iplink_srv_t *, iplink_ srv_sdu_t *);67 extern int iplink_ev_recv(iplink_srv_t *, iplink_recv_sdu_t *, uint16_t); 82 68 83 69 #endif -
uspace/lib/c/include/io/charfield.h
r80445cf r4c53333 1 1 /* 2 2 * Copyright (c) 2006 Josef Cejka 3 * Copyright (c) 2011 Petr Koupy 3 4 * All rights reserved. 4 5 * … … 33 34 */ 34 35 35 #ifndef IMGMAP_SCREENBUFFER_H__36 #define IMGMAP_SCREENBUFFER_H__36 #ifndef LIBC_IO_CHARFIELD_H_ 37 #define LIBC_IO_CHARFIELD_H_ 37 38 38 39 #include <sys/types.h> 39 #include < bool.h>40 #include <stdbool.h> 40 41 #include <io/color.h> 41 42 #include <io/style.h> 42 #include "fb.h"43 #include <io/pixel.h> 43 44 44 45 typedef enum { 45 SCREENBUFFER_FLAG_NONE = 0,46 SCREENBUFFER_FLAG_SHARED= 147 } screenbuffer_flag_t;46 CHAR_FLAG_NONE = 0, 47 CHAR_FLAG_DIRTY = 1 48 } char_flags_t; 48 49 49 50 typedef enum { … … 52 53 CHAR_ATTR_RGB 53 54 } char_attr_type_t; 54 55 typedef enum {56 CHAR_FLAG_NONE = 0,57 CHAR_FLAG_DIRTY = 158 } char_flags_t;59 55 60 56 typedef struct { … … 65 61 66 62 typedef struct { 67 pixel_t bgcolor; /**< Background color */68 pixel_t fgcolor; /**< Foreground color */63 pixel_t bgcolor; 64 pixel_t fgcolor; 69 65 } char_attr_rgb_t; 70 66 … … 80 76 } char_attrs_t; 81 77 82 /** One field on screen. It contain one character and its attributes. */83 78 typedef struct { 84 wchar_t ch; /**< Character itself */85 char_attrs_t attrs; /**< Character attributes */86 char_flags_t flags; /**< Character flags */79 wchar_t ch; 80 char_attrs_t attrs; 81 char_flags_t flags; 87 82 } charfield_t; 88 83 89 /** Compare two sets of attributes.90 *91 * @param a1 First attribute.92 * @param a2 Second attribute.93 *94 * @return True on equality95 *96 */97 84 static inline bool attrs_same(char_attrs_t a1, char_attrs_t a2) 98 85 { … … 115 102 } 116 103 117 extern screenbuffer_t *screenbuffer_create(sysarg_t, sysarg_t,118 screenbuffer_flag_t);119 120 extern charfield_t *screenbuffer_field_at(screenbuffer_t *, sysarg_t, sysarg_t);121 extern bool screenbuffer_cursor_at(screenbuffer_t *, sysarg_t, sysarg_t);122 123 extern sysarg_t screenbuffer_get_top_row(screenbuffer_t *);124 125 extern sysarg_t screenbuffer_putchar(screenbuffer_t *, wchar_t, bool);126 extern sysarg_t screenbuffer_newline(screenbuffer_t *);127 extern sysarg_t screenbuffer_tabstop(screenbuffer_t *, sysarg_t);128 extern sysarg_t screenbuffer_backspace(screenbuffer_t *);129 130 extern void screenbuffer_clear(screenbuffer_t *);131 extern void screenbuffer_clear_row(screenbuffer_t *, sysarg_t);132 133 extern void screenbuffer_set_cursor(screenbuffer_t *, sysarg_t, sysarg_t);134 extern void screenbuffer_set_cursor_visibility(screenbuffer_t *, bool);135 extern bool screenbuffer_get_cursor_visibility(screenbuffer_t *);136 137 extern void screenbuffer_get_cursor(screenbuffer_t *, sysarg_t *, sysarg_t *);138 139 extern void screenbuffer_set_style(screenbuffer_t *, console_style_t);140 extern void screenbuffer_set_color(screenbuffer_t *, console_color_t,141 console_color_t, console_color_attr_t);142 extern void screenbuffer_set_rgb_color(screenbuffer_t *, pixel_t, pixel_t);143 144 104 #endif 145 105 -
uspace/lib/c/include/io/con_srv.h
r80445cf r4c53333 1 1 /* 2 * Copyright (c) 2006 Jakub Jermar 3 * Copyright (c) 2011 Radim Vansa 2 * Copyright (c) 2012 Jiri Svoboda 4 3 * All rights reserved. 5 4 * … … 34 33 */ 35 34 36 #ifndef LIBC_ HASH_SET_H_37 #define LIBC_ HASH_SET_H_35 #ifndef LIBC_CON_SRV_H_ 36 #define LIBC_CON_SRV_H_ 38 37 39 38 #include <adt/list.h> 40 #include <unistd.h> 39 #include <async.h> 40 #include <fibril_synch.h> 41 #include <io/color.h> 42 #include <io/concaps.h> 43 #include <io/cons_event.h> 44 #include <io/pixel.h> 45 #include <io/style.h> 46 #include <stdbool.h> 47 #include <sys/time.h> 48 #include <sys/types.h> 41 49 42 #define HASH_SET_MIN_SIZE 8 50 typedef struct con_ops con_ops_t; 43 51 44 typedef unsigned long (*hash_set_hash)(const link_t *); 45 typedef int (*hash_set_equals)(const link_t *, const link_t *); 52 /** Service setup (per sevice) */ 53 typedef struct { 54 con_ops_t *ops; 55 void *sarg; 56 /** Period to check for abort */ 57 suseconds_t abort_timeout; 58 bool aborted; 59 } con_srvs_t; 46 60 47 /** Hash table structure.*/61 /** Server structure (per client session) */ 48 62 typedef struct { 49 list_t *table; 50 51 /** Current table size */ 52 size_t size; 53 54 /** 55 * Current number of entries. If count > size, 56 * the table is rehashed into table with double 57 * size. If (4 * count < size) && (size > min_size), 58 * the table is rehashed into table with half the size. 59 */ 60 size_t count; 61 62 /** Hash function */ 63 hash_set_hash hash; 64 65 /** Hash table item equals function */ 66 hash_set_equals equals; 67 } hash_set_t; 63 con_srvs_t *srvs; 64 async_sess_t *client_sess; 65 void *carg; 66 } con_srv_t; 68 67 69 extern int hash_set_init(hash_set_t *, hash_set_hash, hash_set_equals, size_t); 70 extern int hash_set_insert(hash_set_t *, link_t *); 71 extern link_t *hash_set_find(hash_set_t *, const link_t *); 72 extern int hash_set_contains(const hash_set_t *, const link_t *); 73 extern size_t hash_set_count(const hash_set_t *); 74 extern link_t *hash_set_remove(hash_set_t *, const link_t *); 75 extern void hash_set_remove_selected(hash_set_t *, 76 int (*)(link_t *, void *), void *); 77 extern void hash_set_destroy(hash_set_t *); 78 extern void hash_set_apply(hash_set_t *, void (*)(link_t *, void *), void *); 79 extern void hash_set_clear(hash_set_t *, void (*)(link_t *, void *), void *); 68 struct con_ops { 69 int (*open)(con_srvs_t *, con_srv_t *); 70 int (*close)(con_srv_t *); 71 int (*read)(con_srv_t *, void *, size_t); 72 int (*write)(con_srv_t *, void *, size_t); 73 void (*sync)(con_srv_t *); 74 void (*clear)(con_srv_t *); 75 void (*set_pos)(con_srv_t *, sysarg_t col, sysarg_t row); 76 int (*get_pos)(con_srv_t *, sysarg_t *, sysarg_t *); 77 int (*get_size)(con_srv_t *, sysarg_t *, sysarg_t *); 78 int (*get_color_cap)(con_srv_t *, console_caps_t *); 79 void (*set_style)(con_srv_t *, console_style_t); 80 void (*set_color)(con_srv_t *, console_color_t, console_color_t, 81 console_color_attr_t); 82 void (*set_rgb_color)(con_srv_t *, pixel_t, pixel_t); 83 void (*set_cursor_visibility)(con_srv_t *, bool); 84 int (*get_event)(con_srv_t *, cons_event_t *); 85 }; 86 87 extern void con_srvs_init(con_srvs_t *); 88 89 extern int con_conn(ipc_callid_t, ipc_call_t *, con_srvs_t *); 80 90 81 91 #endif -
uspace/lib/c/include/io/console.h
r80445cf r4c53333 37 37 38 38 #include <sys/time.h> 39 #include <io/concaps.h> 40 #include <io/kbd_event.h> 41 #include <io/cons_event.h> 39 42 #include <io/keycode.h> 40 43 #include <async.h> 41 #include < bool.h>44 #include <stdbool.h> 42 45 #include <stdio.h> 43 44 typedef enum {45 CONSOLE_CAP_NONE = 0,46 CONSOLE_CAP_STYLE = 1,47 CONSOLE_CAP_INDEXED = 2,48 CONSOLE_CAP_RGB = 449 } console_caps_t;50 46 51 47 /** Console control structure. */ … … 70 66 } console_ctrl_t; 71 67 72 typedef enum {73 KEY_PRESS,74 KEY_RELEASE75 } kbd_event_type_t;76 77 /** Console event structure. */78 typedef struct {79 /** List handle */80 link_t link;81 82 /** Press or release event. */83 kbd_event_type_t type;84 85 /** Keycode of the key that was pressed or released. */86 keycode_t key;87 88 /** Bitmask of modifiers held. */89 keymod_t mods;90 91 /** The character that was generated or '\0' for none. */92 wchar_t c;93 } kbd_event_t;94 95 68 extern console_ctrl_t *console_init(FILE *, FILE *); 96 69 extern void console_done(console_ctrl_t *); … … 110 83 extern void console_cursor_visibility(console_ctrl_t *, bool); 111 84 extern int console_get_color_cap(console_ctrl_t *, sysarg_t *); 112 extern bool console_get_ kbd_event(console_ctrl_t *, kbd_event_t *);113 extern bool console_get_ kbd_event_timeout(console_ctrl_t *, kbd_event_t *,85 extern bool console_get_event(console_ctrl_t *, cons_event_t *); 86 extern bool console_get_event_timeout(console_ctrl_t *, cons_event_t *, 114 87 suseconds_t *); 115 88 -
uspace/lib/c/include/io/klog.h
r80445cf r4c53333 38 38 #include <sys/types.h> 39 39 #include <stdarg.h> 40 #include <io/verify.h> 40 41 41 42 extern size_t klog_write(const void *, size_t); 42 43 extern void klog_update(void); 43 extern int klog_printf(const char *, ...); 44 extern void klog_command(const void *, size_t); 45 extern int klog_printf(const char *, ...) 46 PRINTF_ATTRIBUTE(1, 2); 44 47 extern int klog_vprintf(const char *, va_list); 45 48 -
uspace/lib/c/include/io/log.h
r80445cf r4c53333 36 36 37 37 #include <stdarg.h> 38 #include <inttypes.h> 39 #include <io/verify.h> 38 40 41 /** Log message level. */ 39 42 typedef enum { 43 /** Fatal error, program is not able to recover at all. */ 40 44 LVL_FATAL, 45 /** Serious error but the program can recover from it. */ 41 46 LVL_ERROR, 47 /** Easily recoverable problem. */ 42 48 LVL_WARN, 49 /** Information message that ought to be printed by default. */ 43 50 LVL_NOTE, 51 /** Debugging purpose message. */ 44 52 LVL_DEBUG, 53 /** More detailed debugging message. */ 45 54 LVL_DEBUG2, 46 55 47 56 /** For checking range of values */ 48 57 LVL_LIMIT 49 58 } log_level_t; 50 59 51 extern int log_init(const char *, log_level_t); 52 extern void log_msg(log_level_t, const char *, ...); 53 extern void log_msgv(log_level_t, const char *, va_list); 60 /** Log itself (logging target). */ 61 typedef sysarg_t log_t; 62 /** Formatting directive for printing log_t. */ 63 #define PRIlogctx PRIxn 64 65 /** Default log (target). */ 66 #define LOG_DEFAULT ((log_t) -1) 67 68 /** Use when creating new top-level log. */ 69 #define LOG_NO_PARENT ((log_t) 0) 70 71 extern const char *log_level_str(log_level_t); 72 extern int log_level_from_str(const char *, log_level_t *); 73 74 extern int log_init(const char *); 75 extern log_t log_create(const char *, log_t); 76 77 extern void log_msg(log_t, log_level_t, const char *, ...) 78 PRINTF_ATTRIBUTE(3, 4); 79 extern void log_msgv(log_t, log_level_t, const char *, va_list); 54 80 55 81 #endif -
uspace/lib/c/include/io/visualizer.h
r80445cf r4c53333 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2011 Petr Koupy 3 3 * All rights reserved. 4 4 * … … 30 30 * @{ 31 31 */ 32 33 32 /** @file 34 * Generic module functions.35 *36 * @todo MAKE IT POSSIBLE TO REMOVE THIS FILE VIA EITHER REPLACING PART OF ITS37 * FUNCTIONALITY OR VIA INTEGRATING ITS FUNCTIONALITY MORE TIGHTLY WITH THE REST38 * OF THE SYSTEM.39 33 */ 40 34 41 #ifndef LIBC_ MODULES_H_42 #define LIBC_ MODULES_H_35 #ifndef LIBC_IO_VISUALIZER_H_ 36 #define LIBC_IO_VISUALIZER_H_ 43 37 38 #include <sys/types.h> 44 39 #include <async.h> 45 #include <ipc/services.h> 46 #include <sys/time.h> 40 #include <io/mode.h> 47 41 48 /** Connect to module function type definition. 49 * 50 * @return Session to the service. 51 * 52 */ 53 typedef async_sess_t *connect_module_t(services_t); 42 extern int visualizer_claim(async_sess_t *, sysarg_t); 43 extern int visualizer_yield(async_sess_t *); 54 44 55 extern void answer_call(ipc_callid_t, int, ipc_call_t *, size_t); 56 extern async_sess_t *bind_service(services_t, sysarg_t, sysarg_t, sysarg_t, 57 async_client_conn_t); 58 extern async_sess_t *connect_to_service(services_t); 59 extern int data_reply(void *, size_t); 60 extern void refresh_answer(ipc_call_t *, size_t *); 45 extern int visualizer_enumerate_modes(async_sess_t *, vslmode_t *, sysarg_t); 46 extern int visualizer_get_default_mode(async_sess_t *, vslmode_t *); 47 extern int visualizer_get_current_mode(async_sess_t *, vslmode_t *); 48 extern int visualizer_get_mode(async_sess_t *, vslmode_t *, sysarg_t); 49 extern int visualizer_set_mode(async_sess_t *, sysarg_t, sysarg_t, void *); 50 51 extern int visualizer_update_damaged_region(async_sess_t *, 52 sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t); 53 54 extern int visualizer_suspend(async_sess_t *); 55 extern int visualizer_wakeup(async_sess_t *); 61 56 62 57 #endif -
uspace/lib/c/include/ipc/console.h
r80445cf r4c53333 43 43 CONSOLE_GET_EVENT, 44 44 CONSOLE_GET_POS, 45 CONSOLE_ GOTO,45 CONSOLE_SET_POS, 46 46 CONSOLE_CLEAR, 47 47 CONSOLE_SET_STYLE, 48 48 CONSOLE_SET_COLOR, 49 49 CONSOLE_SET_RGB_COLOR, 50 CONSOLE_ CURSOR_VISIBILITY50 CONSOLE_SET_CURSOR_VISIBILITY 51 51 } console_request_t; 52 52 -
uspace/lib/c/include/ipc/dev_iface.h
r80445cf r4c53333 38 38 /** Character device interface */ 39 39 CHAR_DEV_IFACE, 40 41 /** Graphic device interface */ 42 GRAPH_DEV_IFACE, 40 43 41 44 /** Network interface controller interface */ … … 51 54 /** Interface provided by USB HID devices. */ 52 55 USBHID_DEV_IFACE, 56 /** Interface provided by Real Time Clock devices */ 57 CLOCK_DEV_IFACE, 58 /** Interface provided by battery powered devices */ 59 BATTERY_DEV_IFACE, 60 /** Interface provided by AHCI devices. */ 61 AHCI_DEV_IFACE, 53 62 54 63 DEV_IFACE_MAX -
uspace/lib/c/include/ipc/devman.h
r80445cf r4c53333 157 157 DEVMAN_FUN_GET_CHILD, 158 158 DEVMAN_FUN_GET_NAME, 159 DEVMAN_FUN_GET_DRIVER_NAME, 159 160 DEVMAN_FUN_ONLINE, 160 161 DEVMAN_FUN_OFFLINE, -
uspace/lib/c/include/ipc/inet.h
r80445cf r4c53333 45 45 INET_PORT_CFG, 46 46 /** Ping service port */ 47 INET_PORT_PING 47 INET_PORT_PING, 48 /** Ping6 service port */ 49 INET_PORT_PING6 48 50 } inet_port_t; 49 51 … … 88 90 } inetping_request_t; 89 91 92 /** Events on Inet ping6 port */ 93 typedef enum { 94 INETPING6_EV_RECV = IPC_FIRST_USER_METHOD 95 } inetping6_event_t; 96 97 /** Requests on Inet ping6 port */ 98 typedef enum { 99 INETPING6_SEND = IPC_FIRST_USER_METHOD, 100 INETPING6_GET_SRCADDR 101 } inetping6_request_t; 102 90 103 #endif 91 104 -
uspace/lib/c/include/ipc/input.h
r80445cf r4c53333 46 46 INPUT_EVENT_KEY = IPC_FIRST_USER_METHOD, 47 47 INPUT_EVENT_MOVE, 48 INPUT_EVENT_ABS_MOVE, 48 49 INPUT_EVENT_BUTTON 49 50 } input_notif_t; -
uspace/lib/c/include/ipc/ipc.h
r80445cf r4c53333 47 47 48 48 typedef void (*ipc_async_callback_t)(void *, int, ipc_call_t *); 49 50 /*51 * User-friendly wrappers for ipc_call_sync_fast() and ipc_call_sync_slow().52 * They are in the form ipc_call_sync_m_n(), where m denotes the number of53 * arguments of payload and n denotes number of return values. Whenever54 * possible, the fast version is used.55 */56 57 #define ipc_call_sync_0_0(phoneid, method) \58 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0)59 #define ipc_call_sync_0_1(phoneid, method, res1) \60 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0)61 #define ipc_call_sync_0_2(phoneid, method, res1, res2) \62 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0)63 #define ipc_call_sync_0_3(phoneid, method, res1, res2, res3) \64 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \65 0, 0)66 #define ipc_call_sync_0_4(phoneid, method, res1, res2, res3, res4) \67 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \68 (res4), 0)69 #define ipc_call_sync_0_5(phoneid, method, res1, res2, res3, res4, res5) \70 ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \71 (res4), (res5))72 73 #define ipc_call_sync_1_0(phoneid, method, arg1) \74 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0)75 #define ipc_call_sync_1_1(phoneid, method, arg1, res1) \76 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0)77 #define ipc_call_sync_1_2(phoneid, method, arg1, res1, res2) \78 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \79 0, 0)80 #define ipc_call_sync_1_3(phoneid, method, arg1, res1, res2, res3) \81 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \82 (res3), 0, 0)83 #define ipc_call_sync_1_4(phoneid, method, arg1, res1, res2, res3, res4) \84 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \85 (res3), (res4), 0)86 #define ipc_call_sync_1_5(phoneid, method, arg1, res1, res2, res3, res4, \87 res5) \88 ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \89 (res3), (res4), (res5))90 91 #define ipc_call_sync_2_0(phoneid, method, arg1, arg2) \92 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \93 0, 0)94 #define ipc_call_sync_2_1(phoneid, method, arg1, arg2, res1) \95 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \96 0, 0)97 #define ipc_call_sync_2_2(phoneid, method, arg1, arg2, res1, res2) \98 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \99 (res2), 0, 0, 0)100 #define ipc_call_sync_2_3(phoneid, method, arg1, arg2, res1, res2, res3) \101 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \102 (res2), (res3), 0, 0)103 #define ipc_call_sync_2_4(phoneid, method, arg1, arg2, res1, res2, res3, \104 res4) \105 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \106 (res2), (res3), (res4), 0)107 #define ipc_call_sync_2_5(phoneid, method, arg1, arg2, res1, res2, res3, \108 res4, res5)\109 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \110 (res2), (res3), (res4), (res5))111 112 #define ipc_call_sync_3_0(phoneid, method, arg1, arg2, arg3) \113 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \114 0, 0)115 #define ipc_call_sync_3_1(phoneid, method, arg1, arg2, arg3, res1) \116 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \117 0, 0, 0, 0)118 #define ipc_call_sync_3_2(phoneid, method, arg1, arg2, arg3, res1, res2) \119 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \120 (res2), 0, 0, 0)121 #define ipc_call_sync_3_3(phoneid, method, arg1, arg2, arg3, res1, res2, \122 res3) \123 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \124 (res1), (res2), (res3), 0, 0)125 #define ipc_call_sync_3_4(phoneid, method, arg1, arg2, arg3, res1, res2, \126 res3, res4) \127 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \128 (res1), (res2), (res3), (res4), 0)129 #define ipc_call_sync_3_5(phoneid, method, arg1, arg2, arg3, res1, res2, \130 res3, res4, res5) \131 ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \132 (res1), (res2), (res3), (res4), (res5))133 134 #define ipc_call_sync_4_0(phoneid, method, arg1, arg2, arg3, arg4) \135 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \136 0, 0, 0, 0, 0)137 #define ipc_call_sync_4_1(phoneid, method, arg1, arg2, arg3, arg4, res1) \138 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \139 (res1), 0, 0, 0, 0)140 #define ipc_call_sync_4_2(phoneid, method, arg1, arg2, arg3, arg4, res1, res2) \141 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \142 (res1), (res2), 0, 0, 0)143 #define ipc_call_sync_4_3(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \144 res3) \145 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \146 (arg4), 0, (res1), (res2), (res3), 0, 0)147 #define ipc_call_sync_4_4(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \148 res3, res4) \149 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \150 (arg4), 0, (res1), (res2), (res3), (res4), 0)151 #define ipc_call_sync_4_5(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \152 res3, res4, res5) \153 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \154 (arg4), 0, (res1), (res2), (res3), (res4), (res5))155 156 #define ipc_call_sync_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \157 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \158 (arg5), 0, 0, 0, 0, 0)159 #define ipc_call_sync_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1) \160 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \161 (arg5), (res1), 0, 0, 0, 0)162 #define ipc_call_sync_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \163 res2) \164 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \165 (arg4), (arg5), (res1), (res2), 0, 0, 0)166 #define ipc_call_sync_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \167 res2, res3) \168 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \169 (arg4), (arg5), (res1), (res2), (res3), 0, 0)170 #define ipc_call_sync_5_4(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \171 res2, res3, res4) \172 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \173 (arg4), (arg5), (res1), (res2), (res3), (res4), 0)174 #define ipc_call_sync_5_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \175 res2, res3, res4, res5) \176 ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \177 (arg4), (arg5), (res1), (res2), (res3), (res4), (res5))178 179 extern int ipc_call_sync_fast(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t,180 sysarg_t *, sysarg_t *, sysarg_t *, sysarg_t *, sysarg_t *);181 182 extern int ipc_call_sync_slow(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t,183 sysarg_t, sysarg_t, sysarg_t *, sysarg_t *, sysarg_t *, sysarg_t *,184 sysarg_t *);185 49 186 50 extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, sysarg_t, unsigned int); … … 254 118 sysarg_t, sysarg_t, void *, ipc_async_callback_t, bool); 255 119 256 extern int ipc_connect_to_me(int, sysarg_t, sysarg_t, sysarg_t, task_id_t *,257 sysarg_t *);258 extern int ipc_connect_me(int);259 extern int ipc_connect_me_to(int, sysarg_t, sysarg_t, sysarg_t);260 extern int ipc_connect_me_to_blocking(int, sysarg_t, sysarg_t, sysarg_t);261 262 120 extern int ipc_hangup(int); 263 121 … … 267 125 sysarg_t, sysarg_t, sysarg_t, unsigned int); 268 126 269 /*270 * User-friendly wrappers for ipc_share_in_start().271 */272 273 #define ipc_share_in_start_0_0(phoneid, size, dst) \274 ipc_share_in_start((phoneid), (size), 0, NULL, (dst))275 #define ipc_share_in_start_0_1(phoneid, size, flags, dst) \276 ipc_share_in_start((phoneid), (size), 0, (flags), (dst))277 #define ipc_share_in_start_1_0(phoneid, size, arg, dst) \278 ipc_share_in_start((phoneid), (size), (arg), NULL, (dst))279 #define ipc_share_in_start_1_1(phoneid, size, arg, flags, dst) \280 ipc_share_in_start((phoneid), (size), (arg), (flags), (dst))281 282 extern int ipc_share_in_start(int, size_t, sysarg_t, unsigned int *, void **);283 extern int ipc_share_in_finalize(ipc_callid_t, void *, unsigned int);284 extern int ipc_share_out_start(int, void *, unsigned int);285 extern int ipc_share_out_finalize(ipc_callid_t, void **);286 extern int ipc_data_read_start(int, void *, size_t);287 extern int ipc_data_read_finalize(ipc_callid_t, const void *, size_t);288 extern int ipc_data_write_start(int, const void *, size_t);289 extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t);290 291 127 extern int ipc_connect_kbox(task_id_t); 292 128 -
uspace/lib/c/include/ipc/loc.h
r80445cf r4c53333 56 56 LOC_SERVICE_GET_ID, 57 57 LOC_SERVICE_GET_NAME, 58 LOC_SERVICE_GET_SERVER_NAME, 58 59 LOC_NAMESPACE_GET_ID, 59 60 LOC_CALLBACK_CREATE, -
uspace/lib/c/include/ipc/mouseev.h
r80445cf r4c53333 47 47 typedef enum { 48 48 MOUSEEV_MOVE_EVENT = IPC_FIRST_USER_METHOD, 49 MOUSEEV_ABS_MOVE_EVENT, 49 50 MOUSEEV_BUTTON_EVENT 50 51 } mouseev_notif_t; -
uspace/lib/c/include/ipc/services.h
r80445cf r4c53333 45 45 SERVICE_VFS = FOURCC('v', 'f', 's', ' '), 46 46 SERVICE_LOC = FOURCC('l', 'o', 'c', ' '), 47 SERVICE_LOGGER = FOURCC('l', 'o', 'g', 'g'), 47 48 SERVICE_DEVMAN = FOURCC('d', 'e', 'v', 'n'), 48 49 SERVICE_IRC = FOURCC('i', 'r', 'c', ' '), … … 52 53 } services_t; 53 54 54 #define SERVICE_NAME_INET "net/inet" 55 #define SERVICE_NAME_INETCFG "net/inetcfg" 56 #define SERVICE_NAME_INETPING "net/inetping" 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" 57 60 58 61 #endif -
uspace/lib/c/include/ipc/vfs.h
r80445cf r4c53333 38 38 #include <ipc/common.h> 39 39 #include <sys/types.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 42 42 #define FS_NAME_MAXLEN 20 -
uspace/lib/c/include/loc.h
r80445cf r4c53333 38 38 #include <ipc/loc.h> 39 39 #include <async.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 42 42 typedef void (*loc_cat_change_cb_t)(void); … … 56 56 unsigned int); 57 57 extern int loc_service_get_name(service_id_t, char **); 58 extern int loc_service_get_server_name(service_id_t, char **); 58 59 extern int loc_namespace_get_id(const char *, service_id_t *, 59 60 unsigned int); -
uspace/lib/c/include/macros.h
r80445cf r4c53333 38 38 #define min(a, b) ((a) < (b) ? (a) : (b)) 39 39 #define max(a, b) ((a) > (b) ? (a) : (b)) 40 #define abs(a) ((a) >= 0 ? (a) : -(a)) 41 40 42 41 43 #define KiB2SIZE(kb) ((kb) << 10) … … 52 54 | ((((uint64_t) (up)) & 0xffffffff) << 32)) 53 55 56 #ifndef member_to_inst 57 #define member_to_inst(ptr_member, type, member_identif) \ 58 ((type*) (((void*)(ptr_member)) - ((void*)&(((type*)0)->member_identif)))) 54 59 #endif 60 61 62 #endif 63 64 #define _paddname(line) PADD_ ## line ## __ 65 #define _padd(width, line) uint ## width ## _t _paddname(line) 66 #define PADD32 _padd(32, __LINE__) 67 #define PADD16 _padd(16, __LINE__) 68 #define PADD8 _padd(8, __LINE__) 55 69 56 70 /** @} -
uspace/lib/c/include/mem.h
r80445cf r4c53333 37 37 38 38 #include <sys/types.h> 39 #include <cc.h> 39 40 40 #define bzero(ptr, len) memset((ptr), 0, (len))41 42 extern void *mem set(void *, int, size_t);43 extern void *memcpy(void *, const void *, size_t);41 extern void *memset(void *, int, size_t) 42 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns"); 43 extern void *memcpy(void *, const void *, size_t) 44 ATTRIBUTE_OPTIMIZE("-fno-tree-loop-distribute-patterns"); 44 45 extern void *memmove(void *, const void *, size_t); 45 46 extern int bcmp(const void *, const void *, size_t); 46 extern int memcmp(const void *, const void *, size_t); 47 47 48 48 #endif -
uspace/lib/c/include/net/in.h
r80445cf r4c53333 45 45 #define INET_ADDRSTRLEN (4 * 3 + 3 + 1) 46 46 47 #define INADDR_ANY 0 48 49 /** Type definition of the INET address. 50 * @see in_addr 51 */ 52 typedef struct in_addr in_addr_t; 53 54 /** Type definition of the INET socket address. 55 * @see sockaddr_in 56 */ 57 typedef struct sockaddr_in sockaddr_in_t; 47 #define INADDR_ANY 0 58 48 59 49 /** INET address. */ 60 struct in_addr {50 typedef struct in_addr { 61 51 /** 4 byte IP address. */ 62 52 uint32_t s_addr; 63 } ;53 } in_addr_t; 64 54 65 55 /** INET socket address. 66 56 * @see sockaddr 67 57 */ 68 struct sockaddr_in {58 typedef struct sockaddr_in { 69 59 /** Address family. Should be AF_INET. */ 70 60 uint16_t sin_family; … … 72 62 uint16_t sin_port; 73 63 /** Internet address. */ 74 struct in_addrsin_addr;64 in_addr_t sin_addr; 75 65 /** Padding to meet the sockaddr size. */ 76 66 uint8_t sin_zero[8]; 77 } ;67 } sockaddr_in_t; 78 68 79 69 #endif -
uspace/lib/c/include/net/in6.h
r80445cf r4c53333 43 43 44 44 /** INET6 string address maximum length. */ 45 #define INET6_ADDRSTRLEN (8 * 4 + 7 + 1) 46 47 /** Type definition of the INET6 address. 48 * @see in6_addr 49 */ 50 typedef struct in6_addr in6_addr_t; 51 52 /** Type definition of the INET6 socket address. 53 * @see sockaddr_in6 54 */ 55 typedef struct sockaddr_in6 sockaddr_in6_t; 45 #define INET6_ADDRSTRLEN (8 * 4 + 7 + 1) 56 46 57 47 /** INET6 address. */ 58 struct in6_addr {48 typedef struct in6_addr { 59 49 /** 16 byte IPv6 address. */ 60 u nsigned chars6_addr[16];61 } ;50 uint8_t s6_addr[16]; 51 } in6_addr_t; 62 52 63 53 /** INET6 socket address. 64 54 * @see sockaddr 65 55 */ 66 struct sockaddr_in6 {56 typedef struct sockaddr_in6 { 67 57 /** Address family. Should be AF_INET6. */ 68 58 uint16_t sin6_family; … … 75 65 /** Scope identifier. */ 76 66 uint32_t sin6_scope_id; 77 }; 67 } sockaddr_in6_t; 68 69 extern const in6_addr_t in6addr_any; 78 70 79 71 #endif -
uspace/lib/c/include/net/inet.h
r80445cf r4c53333 41 41 #include <byteorder.h> 42 42 43 /** Type definition of the socket address.44 * @see sockaddr45 */46 typedef struct sockaddr sockaddr_t;47 48 43 /** Type definition of the address information. 49 44 * @see addrinfo 50 45 */ 51 typedef struct addrinfo addrinfo_t;46 typedef struct addrinfo addrinfo_t; 52 47 53 48 /** Socket address. */ 54 struct sockaddr {49 typedef struct sockaddr { 55 50 /** Address family. @see socket.h */ 56 51 uint16_t sa_family; 57 52 /** 14 byte protocol address. */ 58 53 uint8_t sa_data[14]; 59 } ;54 } sockaddr_t; 60 55 61 56 extern int inet_ntop(uint16_t, const uint8_t *, char *, size_t); -
uspace/lib/c/include/net/ip_protocols.h
r80445cf r4c53333 44 44 /*@{*/ 45 45 46 #define IPPROTO_ICMP 1 47 #define IPPROTO_TCP 6 48 #define IPPROTO_UDP 17 46 #define IPPROTO_ICMP 1 47 #define IPPROTO_TCP 6 48 #define IPPROTO_UDP 17 49 #define IPPROTO_ICMPV6 58 49 50 50 51 /*@}*/ -
uspace/lib/c/include/net/socket_codes.h
r80445cf r4c53333 45 45 46 46 enum { 47 AF_ UNKNOWN= 0,48 AF_INET, /* IPv4 address */49 AF_INET6 /* IPv6 address */47 AF_NONE = 0, 48 AF_INET, /* IPv4 address */ 49 AF_INET6 /* IPv6 address */ 50 50 }; 51 51 … … 53 53 54 54 /** @name Protocol families definitions 55 * Same as address families.55 * Same as address families. 56 56 */ 57 57 /*@{*/ 58 58 59 #define PF_INET AF_INET60 #define PF_INET6 AF_INET659 #define PF_INET AF_INET 60 #define PF_INET6 AF_INET6 61 61 62 62 /*@}*/ -
uspace/lib/c/include/nic/nic.h
r80445cf r4c53333 40 40 41 41 #include <nic/eth_phys.h> 42 #include < bool.h>42 #include <stdbool.h> 43 43 44 44 /** Ethernet address length. */ -
uspace/lib/c/include/ns.h
r80445cf r4c53333 37 37 38 38 #include <sys/types.h> 39 #include <ipc/services.h> 39 40 #include <task.h> 40 41 #include <async.h> 41 42 42 43 extern int service_register(sysarg_t); 43 extern async_sess_t *service_connect(exch_mgmt_t, s ysarg_t, sysarg_t, sysarg_t);44 extern async_sess_t *service_connect_blocking(exch_mgmt_t, s ysarg_t, 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, 45 46 sysarg_t); 47 extern async_sess_t *service_bind(services_t, sysarg_t, sysarg_t, sysarg_t, 48 async_client_conn_t); 46 49 47 50 extern int ns_ping(void); -
uspace/lib/c/include/rtld/dynamic.h
r80445cf r4c53333 36 36 #define LIBC_RTLD_DYNAMIC_H_ 37 37 38 #include < bool.h>38 #include <stdbool.h> 39 39 #include <rtld/elf_dyn.h> 40 40 #include <libarch/rtld/dynamic.h> -
uspace/lib/c/include/setjmp.h
r80445cf r4c53333 38 38 #include <libarch/fibril.h> 39 39 40 typedef context_t jmp_buf ;40 typedef context_t jmp_buf[1]; 41 41 42 42 extern int setjmp(jmp_buf env); … … 47 47 /** @} 48 48 */ 49 -
uspace/lib/c/include/sort.h
r80445cf r4c53333 37 37 38 38 #include <sys/types.h> 39 #include < bool.h>39 #include <stdbool.h> 40 40 41 41 typedef int (* sort_cmp_t)(void *, void *, void *); -
uspace/lib/c/include/stack.h
r80445cf r4c53333 1 1 /* 2 * Copyright (c) 20 06 Martin Decky2 * Copyright (c) 2012 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 33 33 */ 34 34 35 #ifndef LIBC_ BOOL_H_36 #define LIBC_ BOOL_H_35 #ifndef LIBC_STACK_H_ 36 #define LIBC_STACK_H_ 37 37 38 38 #include <libarch/types.h> 39 #include <abi/bool.h>40 39 41 #define false 0 42 #define true 1 40 extern size_t stack_size_get(void); 43 41 44 42 #endif -
uspace/lib/c/include/stacktrace.h
r80445cf r4c53333 38 38 39 39 #include <sys/types.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 42 42 typedef struct { -
uspace/lib/c/include/stats.h
r80445cf r4c53333 39 39 #include <thread.h> 40 40 #include <stdint.h> 41 #include < bool.h>41 #include <stdbool.h> 42 42 #include <sys/types.h> 43 43 #include <abi/sysinfo.h> -
uspace/lib/c/include/stdarg.h
r80445cf r4c53333 43 43 #define va_arg(ap, type) __builtin_va_arg(ap, type) 44 44 #define va_end(ap) __builtin_va_end(ap) 45 #define va_copy(dst, src) __builtin_va_copy(dst, src) 45 46 46 47 #endif -
uspace/lib/c/include/stdbool.h
r80445cf r4c53333 1 1 /* 2 * Copyright (c) 20 11 Jiri Zarevucky2 * Copyright (c) 2006 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup lib posix29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 /** @file Boolean type and values.32 /** @file 33 33 */ 34 34 35 #ifndef POSIX_STDBOOL_H_ 36 #define POSIX_STDBOOL_H_ 37 38 #ifdef LIBC_BOOL_H_ 39 #error "You can't include bool.h and stdbool.h at the same time." 40 #endif 35 #ifndef LIBC_BOOL_H_ 41 36 #define LIBC_BOOL_H_ 42 37 43 #define bool _Bool 44 #define true 1 45 #define false 0 38 #include <libarch/types.h> 39 #include <abi/bool.h> 40 41 #define false 0 42 #define true 1 43 46 44 #define __bool_true_false_are_defined 1 47 45 48 #endif /* POSIX_STDBOOL_H_ */ 46 #endif 47 48 /** @} 49 */ -
uspace/lib/c/include/stdio.h
r80445cf r4c53333 39 39 #include <stdarg.h> 40 40 #include <str.h> 41 #include <adt/list.h> 42 43 #ifndef NVERIFY_PRINTF 44 45 #define PRINTF_ATTRIBUTE(start, end) \ 46 __attribute__((format(gnu_printf, start, end))) 47 48 #else /* NVERIFY_PRINTF */ 49 50 #define PRINTF_ATTRIBUTE(start, end) 51 52 #endif /* NVERIFY_PRINTF */ 41 #include <io/verify.h> 42 #include <abi/klog.h> 53 43 54 44 #define EOF (-1) … … 62 52 int _n = snprintf(_buf, sizeof(_buf), fmt, ##__VA_ARGS__); \ 63 53 if (_n > 0) \ 64 (void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) _buf, str_size(_buf)); \54 (void) __SYSCALL3(SYS_KLOG, KLOG_WRITE, (sysarg_t) _buf, str_size(_buf)); \ 65 55 } 66 56 … … 153 143 154 144 extern void setvbuf(FILE *, void *, int, size_t); 145 extern void setbuf(FILE *, void *); 155 146 156 147 /* Misc file functions */ -
uspace/lib/c/include/str.h
r80445cf r4c53333 39 39 #include <mem.h> 40 40 #include <sys/types.h> 41 #include < bool.h>41 #include <stdbool.h> 42 42 43 43 #define U_SPECIAL '?' … … 56 56 57 57 extern wchar_t str_decode(const char *str, size_t *offset, size_t sz); 58 extern wchar_t str_decode_reverse(const char *str, size_t *offset, size_t sz); 58 59 extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz); 59 60 … … 73 74 extern size_t wstr_nlength(const wchar_t *str, size_t size); 74 75 76 extern size_t chr_width(wchar_t ch); 77 extern size_t str_width(const char *str); 78 75 79 extern bool ascii_check(wchar_t ch); 76 80 extern bool chr_check(wchar_t ch); … … 78 82 extern int str_cmp(const char *s1, const char *s2); 79 83 extern int str_lcmp(const char *s1, const char *s2, size_t max_len); 84 85 extern bool str_test_prefix(const char *s, const char *p); 80 86 81 87 extern void str_cpy(char *dest, size_t size, const char *src); … … 103 109 extern char *str_ndup(const char *, size_t max_size); 104 110 105 extern int str_uint8_t(const char *, char **, unsigned int, bool, uint8_t *); 106 extern int str_uint16_t(const char *, char **, unsigned int, bool, uint16_t *); 107 extern int str_uint32_t(const char *, char **, unsigned int, bool, uint32_t *); 108 extern int str_uint64_t(const char *, char **, unsigned int, bool, uint64_t *); 109 extern int str_size_t(const char *, char **, unsigned int, bool, size_t *); 111 extern int str_uint8_t(const char *, const char **, unsigned int, bool, 112 uint8_t *); 113 extern int str_uint16_t(const char *, const char **, unsigned int, bool, 114 uint16_t *); 115 extern int str_uint32_t(const char *, const char **, unsigned int, bool, 116 uint32_t *); 117 extern int str_uint64_t(const char *, const char **, unsigned int, bool, 118 uint64_t *); 119 extern int str_size_t(const char *, const char **, unsigned int, bool, 120 size_t *); 110 121 111 122 extern void order_suffix(const uint64_t, uint64_t *, char *); -
uspace/lib/c/include/sys/mman.h
r80445cf r4c53333 39 39 #include <sys/types.h> 40 40 41 #define MAP_FAILED ((void *) -1)41 #define MAP_FAILED AS_MAP_FAILED 42 42 43 43 #define MAP_SHARED (1 << 0) -
uspace/lib/c/include/sys/stat.h
r80445cf r4c53333 37 37 38 38 #include <sys/types.h> 39 #include < bool.h>39 #include <stdbool.h> 40 40 #include <ipc/vfs.h> 41 41 #include <ipc/loc.h> -
uspace/lib/c/include/sys/time.h
r80445cf r4c53333 1 1 /* 2 2 * Copyright (c) 2006 Ondrej Palkovsky 3 * Copyright (c) 2011 Petr Koupy 4 * Copyright (c) 2011 Jiri Zarevucky 3 5 * All rights reserved. 4 6 * … … 39 41 40 42 #define DST_NONE 0 43 #define ASCTIME_BUF_LEN 26 41 44 42 45 typedef long time_t; … … 45 48 typedef uint32_t useconds_t; 46 49 typedef uint32_t mseconds_t; 50 51 struct tm { 52 int tm_sec; /* Seconds [0,60]. */ 53 int tm_min; /* Minutes [0,59]. */ 54 int tm_hour; /* Hour [0,23]. */ 55 int tm_mday; /* Day of month [1,31]. */ 56 int tm_mon; /* Month of year [0,11]. */ 57 int tm_year; /* Years since 1900. */ 58 int tm_wday; /* Day of week [0,6] (Sunday = 0). */ 59 int tm_yday; /* Day of year [0,365]. */ 60 int tm_isdst; /* Daylight Savings flag. */ 61 }; 47 62 48 63 struct timeval { … … 61 76 extern int tv_gteq(struct timeval *tv1, struct timeval *tv2); 62 77 extern int gettimeofday(struct timeval *tv, struct timezone *tz); 78 extern int getuptime(struct timeval *tv); 63 79 64 80 extern void udelay(useconds_t); 81 82 extern time_t mktime(struct tm *tm); 83 extern int time_utc2tm(const time_t time, struct tm *result); 84 extern int time_utc2str(const time_t time, char *buf); 85 extern void time_tm2str(const struct tm *timeptr, char *buf); 86 extern int time_local2tm(const time_t time, struct tm *result); 87 extern int time_local2str(const time_t time, char *buf); 88 extern double difftime(time_t time1, time_t time0); 89 extern size_t strftime(char *restrict s, size_t maxsize, 90 const char *restrict format, const struct tm *restrict tm); 65 91 66 92 #endif -
uspace/lib/c/include/sys/types.h
r80445cf r4c53333 50 50 typedef volatile uint32_t ioport32_t; 51 51 52 typedef int16_t unaligned_int16_t __attribute__ ((aligned(1))); 53 typedef int32_t unaligned_int32_t __attribute__ ((aligned(1))); 54 typedef int64_t unaligned_int64_t __attribute__ ((aligned(1))); 55 56 typedef uint16_t unaligned_uint16_t __attribute__ ((aligned(1))); 57 typedef uint32_t unaligned_uint32_t __attribute__ ((aligned(1))); 58 typedef uint64_t unaligned_uint64_t __attribute__ ((aligned(1))); 59 52 60 #endif 53 61 -
uspace/lib/c/include/sysinfo.h
r80445cf r4c53333 37 37 38 38 #include <sys/types.h> 39 #include < bool.h>39 #include <stdbool.h> 40 40 #include <abi/sysinfo.h> 41 41 -
uspace/lib/c/include/task.h
r80445cf r4c53333 38 38 #include <sys/types.h> 39 39 #include <abi/proc/task.h> 40 #include <stdarg.h> 40 41 41 42 typedef enum { … … 48 49 extern int task_kill(task_id_t); 49 50 50 extern task_id_t task_spawn(const char *, const char *const[], int *);51 51 extern int task_spawnv(task_id_t *, const char *path, const char *const []); 52 52 extern int task_spawnvf(task_id_t *, const char *path, const char *const [], 53 53 int *const []); 54 extern int task_spawn(task_id_t *, const char *path, int, va_list ap); 54 55 extern int task_spawnl(task_id_t *, const char *path, ...); 55 56 -
uspace/lib/c/include/tls.h
r80445cf r4c53333 48 48 extern char _tbss_end; 49 49 50 extern tcb_t * __make_tls(void);51 extern tcb_t * __alloc_tls(void **, size_t);52 extern void __free_tls(tcb_t *);53 extern void __free_tls_arch(tcb_t *, size_t);50 extern tcb_t *tls_make(void); 51 extern tcb_t *tls_alloc_arch(void **, size_t); 52 extern void tls_free(tcb_t *); 53 extern void tls_free_arch(tcb_t *, size_t); 54 54 55 55 #ifdef CONFIG_TLS_VARIANT_1 -
uspace/lib/c/include/unistd.h
r80445cf r4c53333 58 58 #define getpagesize() (PAGE_SIZE) 59 59 60 extern int dup2(int oldfd, int newfd);60 extern int dup2(int, int); 61 61 62 62 extern ssize_t write(int, const void *, size_t); … … 73 73 extern int unlink(const char *); 74 74 75 extern char *getcwd(char * buf, size_t);75 extern char *getcwd(char *, size_t); 76 76 extern int rmdir(const char *); 77 77 extern int chdir(const char *);
Note:
See TracChangeset
for help on using the changeset viewer.
