Changeset a676574 in mainline for uspace/lib/c/include
- Timestamp:
- 2011-01-09T12:18:00Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 54de5ebd
- Parents:
- a3eeef45 (diff), 9d12059 (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:
-
- 12 edited
- 2 moved
-
adt/char_map.h (modified) (3 diffs)
-
adt/generic_char_map.h (modified) (4 diffs)
-
adt/measured_strings.h (modified) (1 diff)
-
async.h (modified) (1 diff)
-
async_sess.h (moved) (moved from uspace/lib/c/include/async_rel.h ) (1 diff)
-
device/hw_res.h (modified) (1 diff)
-
fibril.h (modified) (1 diff)
-
fibril_synch.h (modified) (2 diffs)
-
ipc/irc.h (moved) (moved from uspace/lib/c/include/ipc/bus.h ) (1 diff)
-
ipc/services.h (modified) (1 diff)
-
mem.h (modified) (1 diff)
-
net/socket.h (modified) (1 diff)
-
stdlib.h (modified) (1 diff)
-
task.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/char_map.h
ra3eeef45 ra676574 41 41 42 42 /** Invalid assigned value used also if an entry does not exist. */ 43 #define CHAR_MAP_NULL (-1)43 #define CHAR_MAP_NULL (-1) 44 44 45 45 /** Type definition of the character string to integer map. 46 46 * @see char_map 47 47 */ 48 typedef struct char_map char_map_t;48 typedef struct char_map char_map_t; 49 49 50 50 /** Character string to integer map item. … … 56 56 struct char_map { 57 57 /** Actually mapped character. */ 58 charc;58 uint8_t c; 59 59 /** Stored integral value. */ 60 60 int value; … … 71 71 extern int char_map_initialize(char_map_t *); 72 72 extern void char_map_destroy(char_map_t *); 73 extern int char_map_exclude(char_map_t *, const char*, size_t);74 extern int char_map_add(char_map_t *, const char*, size_t, const int);75 extern int char_map_find(const char_map_t *, const char*, size_t);76 extern int char_map_update(char_map_t *, const char*, size_t, const int);73 extern int char_map_exclude(char_map_t *, const uint8_t *, size_t); 74 extern int char_map_add(char_map_t *, const uint8_t *, size_t, const int); 75 extern int char_map_find(const char_map_t *, const uint8_t *, size_t); 76 extern int char_map_update(char_map_t *, const uint8_t *, size_t, const int); 77 77 78 78 #endif -
uspace/lib/c/include/adt/generic_char_map.h
ra3eeef45 ra676574 62 62 }; \ 63 63 \ 64 int name##_add(name##_t *, const char*, const size_t, type *); \64 int name##_add(name##_t *, const uint8_t *, const size_t, type *); \ 65 65 int name##_count(name##_t *); \ 66 66 void name##_destroy(name##_t *); \ 67 void name##_exclude(name##_t *, const char*, const size_t); \68 type *name##_find(name##_t *, const char*, const size_t); \67 void name##_exclude(name##_t *, const uint8_t *, const size_t); \ 68 type *name##_find(name##_t *, const uint8_t *, const size_t); \ 69 69 int name##_initialize(name##_t *); \ 70 70 int name##_is_valid(name##_t *); … … 74 74 * Should follow declaration with the same parameters. 75 75 * 76 * @param[in] name Name of the map. 77 * @param[in] type Inner object type. 76 * @param[in] name Name of the map. 77 * @param[in] type Inner object type. 78 * 78 79 */ 79 80 #define GENERIC_CHAR_MAP_IMPLEMENT(name, type) \ 80 81 GENERIC_FIELD_IMPLEMENT(name##_items, type) \ 81 82 \ 82 int name##_add(name##_t *map, const char*name, const size_t length, \83 int name##_add(name##_t *map, const uint8_t *name, const size_t length, \ 83 84 type *value) \ 84 85 { \ … … 112 113 } \ 113 114 \ 114 void name##_exclude(name##_t *map, const char*name, \115 void name##_exclude(name##_t *map, const uint8_t *name, \ 115 116 const size_t length) \ 116 117 { \ … … 124 125 } \ 125 126 \ 126 type *name##_find(name##_t *map, const char*name, \127 type *name##_find(name##_t *map, const uint8_t *name, \ 127 128 const size_t length) \ 128 129 { \ -
uspace/lib/c/include/adt/measured_strings.h
ra3eeef45 ra676574 54 54 struct measured_string { 55 55 /** Character string data. */ 56 char*value;56 uint8_t *value; 57 57 /** Character string length. */ 58 58 size_t length; 59 59 }; 60 60 61 extern measured_string_t *measured_string_create_bulk(const char*, size_t);61 extern measured_string_t *measured_string_create_bulk(const uint8_t *, size_t); 62 62 extern measured_string_t *measured_string_copy(measured_string_t *); 63 extern int measured_strings_receive(measured_string_t **, char**, size_t);63 extern int measured_strings_receive(measured_string_t **, uint8_t **, size_t); 64 64 extern int measured_strings_reply(const measured_string_t *, size_t); 65 extern int measured_strings_return(int, measured_string_t **, char**, size_t);65 extern int measured_strings_return(int, measured_string_t **, uint8_t **, size_t); 66 66 extern int measured_strings_send(int, const measured_string_t *, size_t); 67 67 -
uspace/lib/c/include/async.h
ra3eeef45 ra676574 37 37 38 38 #include <ipc/ipc.h> 39 #include <async_sess.h> 39 40 #include <fibril.h> 40 41 #include <sys/time.h> -
uspace/lib/c/include/async_sess.h
ra3eeef45 ra676574 33 33 */ 34 34 35 #ifndef LIBC_ASYNC_ REL_H_36 #define LIBC_ASYNC_ REL_H_35 #ifndef LIBC_ASYNC_SESS_H_ 36 #define LIBC_ASYNC_SESS_H_ 37 37 38 extern int async_rel_init(void); 39 extern int async_relation_create(int); 40 extern void async_relation_destroy(int, int); 38 #include <adt/list.h> 39 40 typedef struct { 41 int sess_phone; /**< Phone for cloning off the connections. */ 42 sysarg_t connect_arg1; /**< Argument for CONNECT_ME_TO. */ 43 link_t conn_head; /**< List of open data connections. */ 44 link_t sess_link; /**< Link in global list of open sessions. */ 45 } async_sess_t; 46 47 extern void _async_sess_init(void); 48 extern void async_session_create(async_sess_t *, int, sysarg_t); 49 extern void async_session_destroy(async_sess_t *); 50 extern int async_exchange_begin(async_sess_t *); 51 extern void async_exchange_end(async_sess_t *, int); 41 52 42 53 #endif -
uspace/lib/c/include/device/hw_res.h
ra3eeef45 ra676574 95 95 96 96 97 bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources); 98 99 bool enable_interrupt(int dev_phone); 97 extern int get_hw_resources(int, hw_resource_list_t *); 98 extern bool enable_interrupt(int); 100 99 101 100 -
uspace/lib/c/include/fibril.h
ra3eeef45 ra676574 94 94 extern void fibril_inc_sercount(void); 95 95 extern void fibril_dec_sercount(void); 96 extern int fibril_get_sercount(void); 96 97 97 98 static inline int fibril_yield(void) -
uspace/lib/c/include/fibril_synch.h
ra3eeef45 ra676574 105 105 extern bool fibril_mutex_trylock(fibril_mutex_t *); 106 106 extern void fibril_mutex_unlock(fibril_mutex_t *); 107 extern bool fibril_mutex_is_locked(fibril_mutex_t *); 107 108 108 109 extern void fibril_rwlock_initialize(fibril_rwlock_t *); … … 111 112 extern void fibril_rwlock_read_unlock(fibril_rwlock_t *); 112 113 extern void fibril_rwlock_write_unlock(fibril_rwlock_t *); 114 extern bool fibril_rwlock_is_read_locked(fibril_rwlock_t *); 115 extern bool fibril_rwlock_is_write_locked(fibril_rwlock_t *); 116 extern bool fibril_rwlock_is_locked(fibril_rwlock_t *); 113 117 114 118 extern void fibril_condvar_initialize(fibril_condvar_t *); -
uspace/lib/c/include/ipc/irc.h
ra3eeef45 ra676574 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 #ifndef LIBC_ BUS_H_36 #define LIBC_ BUS_H_35 #ifndef LIBC_IRC_H_ 36 #define LIBC_IRC_H_ 37 37 38 38 #include <ipc/ipc.h> 39 39 40 40 typedef enum { 41 BUS_CLEAR_INTERRUPT = IPC_FIRST_USER_METHOD 42 } bus_request_t; 41 IRC_ENABLE_INTERRUPT = IPC_FIRST_USER_METHOD, 42 IRC_CLEAR_INTERRUPT 43 } irc_request_t; 43 44 44 45 #endif -
uspace/lib/c/include/ipc/services.h
ra3eeef45 ra676574 49 49 SERVICE_FHC, 50 50 SERVICE_OBIO, 51 SERVICE_APIC, 52 SERVICE_I8259, 51 53 SERVICE_CLIPBOARD, 52 54 SERVICE_NETWORKING, -
uspace/lib/c/include/mem.h
ra3eeef45 ra676574 44 44 extern void *memmove(void *, const void *, size_t); 45 45 46 extern int bcmp(const char *, const char*, size_t);46 extern int bcmp(const void *, const void *, size_t); 47 47 48 48 #endif -
uspace/lib/c/include/net/socket.h
ra3eeef45 ra676574 60 60 extern int sendto(int, const void *, size_t, int, const struct sockaddr *, 61 61 socklen_t); 62 extern int recv(int, void *, size_t, int);63 extern int recvfrom(int, void *, size_t, int, struct sockaddr *, socklen_t *);62 extern ssize_t recv(int, void *, size_t, int); 63 extern ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, socklen_t *); 64 64 extern int getsockopt(int, int, int, void *, size_t *); 65 65 extern int setsockopt(int, int, int, const void *, size_t); -
uspace/lib/c/include/stdlib.h
ra3eeef45 ra676574 46 46 } while (0) 47 47 48 #define core() \ 49 *((int *) 0) = 0xbadbad; 50 48 51 #define exit(status) _exit((status)) 49 52 -
uspace/lib/c/include/task.h
ra3eeef45 ra676574 47 47 extern task_id_t task_get_id(void); 48 48 extern int task_set_name(const char *); 49 extern int task_kill(task_id_t); 50 49 51 extern task_id_t task_spawn(const char *, const char *const[], int *); 50 52 extern int task_spawnv(task_id_t *, const char *path, const char *const []);
Note:
See TracChangeset
for help on using the changeset viewer.
