Changeset ec7f8b1 in mainline
- Timestamp:
- 2011-08-21T15:35:03Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bb74dabe
- Parents:
- c4a8e4a (diff), 5935c079 (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. - Files:
-
- 3 added
- 19 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/asm.h
rc4a8e4a rec7f8b1 41 41 #include <trace.h> 42 42 43 #define IO_SPACE_BOUNDARY ((void *) (64 * 1024)) 44 43 45 /** Return base address of current stack. 44 46 * … … 77 79 } 78 80 79 #define IO_SPACE_BOUNDARY ((void *) (64 * 1024))80 81 81 /** Byte from port 82 82 * … … 91 91 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 92 92 uint8_t val; 93 93 94 asm volatile ( 94 95 "inb %w[port], %b[val]\n" … … 96 97 : [port] "d" (port) 97 98 ); 99 98 100 return val; 99 } else {101 } else 100 102 return (uint8_t) *port; 101 }102 103 } 103 104 … … 114 115 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 115 116 uint16_t val; 117 116 118 asm volatile ( 117 119 "inw %w[port], %w[val]\n" … … 119 121 : [port] "d" (port) 120 122 ); 123 121 124 return val; 122 } else {125 } else 123 126 return (uint16_t) *port; 124 }125 127 } 126 128 … … 137 139 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 138 140 uint32_t val; 141 139 142 asm volatile ( 140 143 "inl %w[port], %[val]\n" … … 142 145 : [port] "d" (port) 143 146 ); 147 144 148 return val; 145 } else {149 } else 146 150 return (uint32_t) *port; 147 }148 151 } 149 152 … … 163 166 :: [val] "a" (val), [port] "d" (port) 164 167 ); 165 } else {168 } else 166 169 *port = val; 167 }168 170 } 169 171 … … 183 185 :: [val] "a" (val), [port] "d" (port) 184 186 ); 185 } else {187 } else 186 188 *port = val; 187 }188 189 } 189 190 … … 203 204 :: [val] "a" (val), [port] "d" (port) 204 205 ); 205 } else {206 } else 206 207 *port = val; 207 }208 208 } 209 209 -
kernel/arch/ia32/include/asm.h
rc4a8e4a rec7f8b1 118 118 :: [val] "a" (val), [port] "d" (port) 119 119 ); 120 } else {120 } else 121 121 *port = val; 122 }123 122 } 124 123 … … 138 137 :: [val] "a" (val), [port] "d" (port) 139 138 ); 140 } else {139 } else 141 140 *port = val; 142 }143 141 } 144 142 … … 158 156 :: [val] "a" (val), [port] "d" (port) 159 157 ); 160 } else {158 } else 161 159 *port = val; 162 }163 160 } 164 161 … … 175 172 if (((void *)port) < IO_SPACE_BOUNDARY) { 176 173 uint8_t val; 174 177 175 asm volatile ( 178 176 "inb %w[port], %b[val]\n" … … 180 178 : [port] "d" (port) 181 179 ); 180 182 181 return val; 183 } else {182 } else 184 183 return (uint8_t) *port; 185 }186 184 } 187 185 … … 198 196 if (((void *)port) < IO_SPACE_BOUNDARY) { 199 197 uint16_t val; 198 200 199 asm volatile ( 201 200 "inw %w[port], %w[val]\n" … … 203 202 : [port] "d" (port) 204 203 ); 204 205 205 return val; 206 } else {206 } else 207 207 return (uint16_t) *port; 208 }209 208 } 210 209 … … 221 220 if (((void *)port) < IO_SPACE_BOUNDARY) { 222 221 uint32_t val; 222 223 223 asm volatile ( 224 224 "inl %w[port], %[val]\n" … … 226 226 : [port] "d" (port) 227 227 ); 228 228 229 return val; 229 } else {230 } else 230 231 return (uint32_t) *port; 231 }232 232 } 233 233 -
uspace/Makefile
rc4a8e4a rec7f8b1 176 176 lib/block \ 177 177 lib/clui \ 178 lib/fmtutil \ 178 179 lib/scsi \ 179 180 lib/softint \ -
uspace/Makefile.common
rc4a8e4a rec7f8b1 112 112 LIBIMGMAP_PREFIX = $(LIB_PREFIX)/imgmap 113 113 LIBCLUI_PREFIX = $(LIB_PREFIX)/clui 114 LIBFMTUTIL_PREFIX = $(LIB_PREFIX)/fmtutil 114 115 115 116 LIBEXT2_PREFIX = $(LIB_PREFIX)/ext2 -
uspace/app/bdsh/Makefile
rc4a8e4a rec7f8b1 29 29 30 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBCLUI_PREFIX)/libclui.a 32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBCLUI_PREFIX) -I. -Icmds/ \ 33 -Icmds/builtins -Icmds/modules 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBCLUI_PREFIX)/libclui.a \ 32 $(LIBFMTUTIL_PREFIX)/libfmtutil.a 33 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBCLUI_PREFIX) \ 34 -I$(LIBFMTUTIL_PREFIX) -I. -Icmds/ -Icmds/builtins -Icmds/modules 34 35 BINARY = bdsh 35 36 -
uspace/app/bdsh/cmds/modules/help/help.c
rc4a8e4a rec7f8b1 1 1 /* 2 2 * Copyright (c) 2008 Tim Post 3 * Copyright (c) 2011 Martin Sucha 3 4 * All rights reserved. 4 5 * … … 30 31 #include <stdlib.h> 31 32 #include <str.h> 33 #include <fmtutil.h> 32 34 33 35 #include "config.h" … … 128 130 static void help_survival(void) 129 131 { 130 printf("Don't panic!\n\n"); 131 132 printf("This is Bdsh, the Brain dead shell, currently " 132 print_wrapped_console( 133 "Don't panic!\n\n" 134 135 "This is Bdsh, the Brain dead shell, currently " 133 136 "the primary user interface to HelenOS. Bdsh allows you to enter " 134 137 "commands and supports history (Up, Down arrow keys), " 135 138 "line editing (Left Arrow, Right Arrow, Home, End, Backspace), " 136 139 "selection (Shift + movement keys), copy and paste (Ctrl-C, " 137 "Ctrl-V), similar to common desktop environments.\n\n" );138 139 printf("The most basic filesystem commands are Bdsh builtins. Type "140 "Ctrl-V), similar to common desktop environments.\n\n" 141 142 "The most basic filesystem commands are Bdsh builtins. Type " 140 143 "'help commands' [Enter] to see the list of Bdsh builtin commands. " 141 144 "Other commands are external executables located in the /app and " 142 145 "/srv directories. Type 'ls /app' [Enter] and 'ls /srv' [Enter] " 143 146 "to see their list. You can execute an external command simply " 144 "by entering its name (e.g. type 'tetris' [Enter]).\n\n" );145 146 printf("HelenOS has virtual consoles (VCs). You can switch between "147 "these using the F1-F11 keys.\n\n" );148 149 printf("This is but a small glimpse of what you can do with HelenOS. "147 "by entering its name (e.g. type 'tetris' [Enter]).\n\n" 148 149 "HelenOS has virtual consoles (VCs). You can switch between " 150 "these using the F1-F11 keys.\n\n" 151 152 "This is but a small glimpse of what you can do with HelenOS. " 150 153 "To learn more please point your browser to the HelenOS User's " 151 "Guide: http://trac.helenos.org/trac.fcgi/wiki/UsersGuide\n\n"); 154 "Guide: http://trac.helenos.org/wiki/UsersGuide\n\n", 155 ALIGN_LEFT); 152 156 } 153 157 -
uspace/app/bdsh/compl.c
rc4a8e4a rec7f8b1 90 90 { 91 91 compl_t *cs = NULL; 92 size_t pref_size;93 92 char *stext = NULL; 94 93 char *prefix = NULL; 95 94 char *dirname = NULL; 95 int retval; 96 97 token_t *tokens = calloc(WORD_MAX, sizeof(token_t)); 98 if (tokens == NULL) { 99 retval = ENOMEM; 100 goto error; 101 } 102 103 size_t pref_size; 96 104 char *rpath_sep; 97 105 static const char *dirlist_arg[] = { ".", NULL }; 98 int retval;99 106 tokenizer_t tok; 100 token_t tokens[WORD_MAX]; 101 unsigned int current_token; 107 ssize_t current_token; 102 108 size_t tokens_length; 103 109 104 110 cs = calloc(1, sizeof(compl_t)); 105 111 if (!cs) { … … 107 113 goto error; 108 114 } 109 115 110 116 /* Convert text buffer to string */ 111 117 stext = wstr_to_astr(text); … … 127 133 128 134 /* Find the current token */ 129 for (current_token = 0; current_token < tokens_length; current_token++) { 135 for (current_token = 0; current_token < (ssize_t) tokens_length; 136 current_token++) { 130 137 token_t *t = &tokens[current_token]; 131 138 size_t end = t->char_start + t->char_length; 132 /* Check if the caret lies inside the token or immediately 139 140 /* 141 * Check if the caret lies inside the token or immediately 133 142 * after it 134 143 */ … … 138 147 } 139 148 140 if (tokens[current_token].type != TOKTYPE_SPACE) { 149 if (tokens_length == 0) 150 current_token = -1; 151 152 if ((current_token >= 0) && (tokens[current_token].type != TOKTYPE_SPACE)) 141 153 *cstart = tokens[current_token].char_start; 142 } 143 else { 154 else 144 155 *cstart = pos; 145 }146 147 /* Extract the prefix being completed156 157 /* 158 * Extract the prefix being completed 148 159 * XXX: handle strings, etc. 149 160 */ … … 154 165 goto error; 155 166 } 156 157 str_ncpy(prefix, pref_size + 1, stext + 158 tokens[current_token].byte_start, pref_size); 167 prefix[pref_size] = 0; 168 169 if (current_token >= 0) { 170 str_ncpy(prefix, pref_size + 1, stext + 171 tokens[current_token].byte_start, pref_size); 172 } 159 173 160 174 /* … … 165 179 166 180 /* Skip any whitespace before current token */ 167 int prev_token = current_token - 1;168 if ( prev_token != -1 && tokens[prev_token].type == TOKTYPE_SPACE) {181 ssize_t prev_token = current_token - 1; 182 if ((prev_token >= 0) && (tokens[prev_token].type == TOKTYPE_SPACE)) 169 183 prev_token--; 170 } 171 184 172 185 /* 173 186 * It is a command if it is the first token or if it immediately 174 187 * follows a pipe token. 175 188 */ 176 if ( prev_token == -1 || tokens[prev_token].type == TOKTYPE_SPACE)189 if ((prev_token < 0) || (tokens[prev_token].type == TOKTYPE_SPACE)) 177 190 cs->is_command = true; 178 191 else … … 249 262 if (cs != NULL) 250 263 free(cs); 264 if (tokens != NULL) 265 free(tokens); 251 266 252 267 return retval; -
uspace/app/bdsh/input.c
rc4a8e4a rec7f8b1 67 67 int process_input(cliuser_t *usr) 68 68 { 69 token_t *tokens = calloc(WORD_MAX, sizeof(token_t)); 70 if (tokens == NULL) 71 return ENOMEM; 72 69 73 char *cmd[WORD_MAX]; 70 token_t tokens_space[WORD_MAX];71 token_t *tokens = tokens_space;72 74 int rc = 0; 73 75 tokenizer_t tok; … … 77 79 char *redir_to = NULL; 78 80 79 if (NULL == usr->line) 81 if (usr->line == NULL) { 82 free(tokens); 80 83 return CL_EFAIL; 84 } 81 85 82 86 rc = tok_init(&tok, usr->line, tokens, WORD_MAX); … … 209 213 } 210 214 tok_fini(&tok); 215 free(tokens); 211 216 212 217 return rc; -
uspace/app/tester/stdio/stdio1.c
rc4a8e4a rec7f8b1 39 39 { 40 40 FILE *file; 41 const char *file_name = "/ readme";41 const char *file_name = "/textdemo"; 42 42 43 43 TPRINTF("Open file \"%s\"...", file_name); -
uspace/dist/src/sysel/demos/htxtfile.sy
rc4a8e4a rec7f8b1 35 35 var out_file : TextFile; 36 36 37 name = "/ readme";37 name = "/textdemo"; 38 38 39 39 in_file = new TextFile(); -
uspace/lib/c/arch/ia32/include/ddi.h
rc4a8e4a rec7f8b1 43 43 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 44 44 uint8_t val; 45 45 46 asm volatile ( 46 47 "inb %w[port], %b[val]\n" … … 48 49 : [port] "d" (port) 49 50 ); 51 50 52 return val; 51 } else {53 } else 52 54 return (uint8_t) *port; 53 }54 55 } 55 56 … … 58 59 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 59 60 uint16_t val; 61 60 62 asm volatile ( 61 63 "inw %w[port], %w[val]\n" … … 63 65 : [port] "d" (port) 64 66 ); 67 65 68 return val; 66 } else {69 } else 67 70 return (uint16_t) *port; 68 }69 71 } 70 72 … … 73 75 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 74 76 uint32_t val; 77 75 78 asm volatile ( 76 79 "inl %w[port], %[val]\n" … … 78 81 : [port] "d" (port) 79 82 ); 83 80 84 return val; 81 } else {85 } else 82 86 return (uint32_t) *port; 83 }84 87 } 85 88 … … 91 94 :: [val] "a" (val), [port] "d" (port) 92 95 ); 93 } else {96 } else 94 97 *port = val; 95 }96 98 } 97 99 … … 103 105 :: [val] "a" (val), [port] "d" (port) 104 106 ); 105 } else {107 } else 106 108 *port = val; 107 }108 109 } 109 110 … … 115 116 :: [val] "a" (val), [port] "d" (port) 116 117 ); 117 } else {118 } else 118 119 *port = val; 119 }120 120 } 121 121 -
uspace/lib/c/generic/async.c
rc4a8e4a rec7f8b1 1656 1656 1657 1657 return sess; 1658 } 1659 1660 /** Set arguments for new connections. 1661 * 1662 * FIXME This is an ugly hack to work around the problem that parallel 1663 * exchanges are implemented using parallel connections. When we create 1664 * a callback session, the framework does not know arguments for the new 1665 * connections. 1666 * 1667 * The proper solution seems to be to implement parallel exchanges using 1668 * tagging. 1669 */ 1670 void async_sess_args_set(async_sess_t *sess, sysarg_t arg1, sysarg_t arg2, 1671 sysarg_t arg3) 1672 { 1673 sess->arg1 = arg1; 1674 sess->arg2 = arg2; 1675 sess->arg3 = arg3; 1658 1676 } 1659 1677 -
uspace/lib/c/generic/devman.c
rc4a8e4a rec7f8b1 89 89 if (devman_driver_block_sess == NULL) 90 90 devman_driver_block_sess = 91 service_connect_blocking(EXCHANGE_ SERIALIZE,91 service_connect_blocking(EXCHANGE_PARALLEL, 92 92 SERVICE_DEVMAN, DEVMAN_DRIVER, 0); 93 93 } … … 138 138 if (devman_driver_sess == NULL) 139 139 devman_driver_sess = 140 service_connect(EXCHANGE_ SERIALIZE, SERVICE_DEVMAN,140 service_connect(EXCHANGE_PARALLEL, SERVICE_DEVMAN, 141 141 DEVMAN_DRIVER, 0); 142 142 -
uspace/lib/c/generic/ns.c
rc4a8e4a rec7f8b1 56 56 async_exchange_end(exch); 57 57 58 /* 59 * FIXME Ugly hack to work around limitation of implementing 60 * parallel exchanges using multiple connections. Shift out 61 * first argument for non-initial connections. 62 */ 63 async_sess_args_set(sess, arg2, arg3, 0); 64 58 65 return sess; 59 66 } … … 66 73 async_connect_me_to_blocking(mgmt, exch, service, arg2, arg3); 67 74 async_exchange_end(exch); 75 76 /* 77 * FIXME Ugly hack to work around limitation of implementing 78 * parallel exchanges using multiple connections. Shift out 79 * first argument for non-initial connections. 80 */ 81 async_sess_args_set(sess, arg2, arg3, 0); 68 82 69 83 return sess; -
uspace/lib/c/generic/str.c
rc4a8e4a rec7f8b1 2 2 * Copyright (c) 2005 Martin Decky 3 3 * Copyright (c) 2008 Jiri Svoboda 4 * Copyright (c) 2011 Martin Sucha 4 5 * All rights reserved. 5 6 * … … 718 719 719 720 dest[dlen - 1] = '\0'; 721 } 722 723 /** Convert string to wide string. 724 * 725 * Convert string @a src to wide string. A new wide NULL-terminated 726 * string will be allocated on the heap. 727 * 728 * @param src Source string. 729 */ 730 wchar_t *str_to_awstr(const char *str) 731 { 732 size_t len = str_length(str); 733 734 wchar_t *wstr = calloc(len+1, sizeof(wchar_t)); 735 if (wstr == NULL) 736 return NULL; 737 738 str_to_wstr(wstr, len + 1, str); 739 return wstr; 720 740 } 721 741 -
uspace/lib/c/include/async.h
rc4a8e4a rec7f8b1 337 337 338 338 /* 339 * FIXME These functions just work around problems with parallel exchange 340 * management. Proper solution needs to be implemented. 341 */ 342 void async_sess_args_set(async_sess_t *sess, sysarg_t, sysarg_t, sysarg_t); 343 344 /* 339 345 * User-friendly wrappers for async_share_in_start(). 340 346 */ -
uspace/lib/c/include/str.h
rc4a8e4a rec7f8b1 83 83 extern char *wstr_to_astr(const wchar_t *src); 84 84 extern void str_to_wstr(wchar_t *dest, size_t dlen, const char *src); 85 extern wchar_t *str_to_awstr(const char *src); 85 86 86 87 extern char *str_chr(const char *str, wchar_t ch); -
uspace/srv/devman/devman.h
rc4a8e4a rec7f8b1 63 63 typedef struct fun_node fun_node_t; 64 64 65 typedef struct { 66 fibril_mutex_t mutex; 67 struct driver *driver; 68 } client_t; 69 65 70 typedef enum { 66 71 /** Driver has not been started. */ -
uspace/srv/devman/main.c
rc4a8e4a rec7f8b1 65 65 static dev_tree_t device_tree; 66 66 67 static int init_running_drv(void *drv); 68 67 69 /** Register running driver. */ 68 static driver_t *devman_driver_register(void) 69 { 70 ipc_call_t icall; 71 ipc_callid_t iid; 70 static driver_t *devman_driver_register(ipc_callid_t callid, ipc_call_t *call) 71 { 72 72 driver_t *driver = NULL; 73 char *drv_name = NULL; 73 74 74 75 log_msg(LVL_DEBUG, "devman_driver_register"); 75 76 iid = async_get_call(&icall);77 if (IPC_GET_IMETHOD(icall) != DEVMAN_DRIVER_REGISTER) {78 async_answer_0(iid, EREFUSED);79 return NULL;80 }81 82 char *drv_name = NULL;83 76 84 77 /* Get driver name. */ 85 78 int rc = async_data_write_accept((void **) &drv_name, true, 0, 0, 0, 0); 86 79 if (rc != EOK) { 87 async_answer_0( iid, rc);80 async_answer_0(callid, rc); 88 81 return NULL; 89 82 } … … 98 91 free(drv_name); 99 92 drv_name = NULL; 100 async_answer_0( iid, ENOENT);93 async_answer_0(callid, ENOENT); 101 94 return NULL; 102 95 } … … 112 105 driver->name); 113 106 fibril_mutex_unlock(&driver->driver_mutex); 114 async_answer_0( iid, EEXISTS);107 async_answer_0(callid, EEXISTS); 115 108 return NULL; 116 109 } … … 134 127 log_msg(LVL_DEBUG, "Creating connection to the `%s' driver.", 135 128 driver->name); 136 driver->sess = async_callback_receive(EXCHANGE_ SERIALIZE);129 driver->sess = async_callback_receive(EXCHANGE_PARALLEL); 137 130 if (!driver->sess) { 138 131 fibril_mutex_unlock(&driver->driver_mutex); 139 async_answer_0( iid, ENOTSUP);132 async_answer_0(callid, ENOTSUP); 140 133 return NULL; 141 134 } 142 143 fibril_mutex_unlock(&driver->driver_mutex);135 /* FIXME: Work around problem with callback sessions */ 136 async_sess_args_set(driver->sess, DRIVER_DEVMAN, 0, 0); 144 137 145 138 log_msg(LVL_NOTE, … … 147 140 driver->name); 148 141 149 async_answer_0(iid, EOK); 150 142 /* 143 * Initialize the driver as running (e.g. pass assigned devices to it) 144 * in a separate fibril; the separate fibril is used to enable the 145 * driver to use devman service during the driver's initialization. 146 */ 147 fid_t fid = fibril_create(init_running_drv, driver); 148 if (fid == 0) { 149 log_msg(LVL_ERROR, "Failed to create initialization fibril " \ 150 "for driver `%s'.", driver->name); 151 fibril_mutex_unlock(&driver->driver_mutex); 152 async_answer_0(callid, ENOMEM); 153 return NULL; 154 } 155 156 fibril_add_ready(fid); 157 fibril_mutex_unlock(&driver->driver_mutex); 158 159 async_answer_0(callid, EOK); 151 160 return driver; 152 161 } … … 429 438 static void devman_connection_driver(ipc_callid_t iid, ipc_call_t *icall) 430 439 { 440 client_t *client; 441 driver_t *driver; 442 431 443 /* Accept the connection. */ 432 444 async_answer_0(iid, EOK); 433 445 434 driver_t *driver = devman_driver_register(); 435 if (driver == NULL) 436 return; 437 438 /* 439 * Initialize the driver as running (e.g. pass assigned devices to it) 440 * in a separate fibril; the separate fibril is used to enable the 441 * driver to use devman service during the driver's initialization. 442 */ 443 fid_t fid = fibril_create(init_running_drv, driver); 444 if (fid == 0) { 445 log_msg(LVL_ERROR, "Failed to create initialization fibril " \ 446 "for driver `%s'.", driver->name); 447 return; 448 } 449 fibril_add_ready(fid); 446 client = async_get_client_data(); 447 if (client == NULL) { 448 log_msg(LVL_ERROR, "Failed to allocate client data."); 449 return; 450 } 450 451 451 452 while (true) { … … 456 457 break; 457 458 459 if (IPC_GET_IMETHOD(call) != DEVMAN_DRIVER_REGISTER) { 460 fibril_mutex_lock(&client->mutex); 461 driver = client->driver; 462 fibril_mutex_unlock(&client->mutex); 463 if (driver == NULL) { 464 /* First call must be to DEVMAN_DRIVER_REGISTER */ 465 async_answer_0(callid, ENOTSUP); 466 continue; 467 } 468 } 469 458 470 switch (IPC_GET_IMETHOD(call)) { 471 case DEVMAN_DRIVER_REGISTER: 472 fibril_mutex_lock(&client->mutex); 473 if (client->driver != NULL) { 474 fibril_mutex_unlock(&client->mutex); 475 async_answer_0(callid, EINVAL); 476 continue; 477 } 478 client->driver = devman_driver_register(callid, &call); 479 fibril_mutex_unlock(&client->mutex); 480 break; 459 481 case DEVMAN_ADD_FUNCTION: 460 482 devman_add_function(callid, &call); … … 814 836 static void devman_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 815 837 { 816 /* Select interface. */838 /* Select port. */ 817 839 switch ((sysarg_t) (IPC_GET_ARG1(*icall))) { 818 840 case DEVMAN_DRIVER: … … 840 862 } 841 863 864 static void *devman_client_data_create(void) 865 { 866 client_t *client; 867 868 client = calloc(1, sizeof(client_t)); 869 if (client == NULL) 870 return NULL; 871 872 fibril_mutex_initialize(&client->mutex); 873 return client; 874 } 875 876 static void devman_client_data_destroy(void *data) 877 { 878 free(data); 879 } 880 842 881 /** Initialize device manager internal structures. */ 843 882 static bool devman_init(void) … … 886 925 } 887 926 888 /* Set a handler of incomming connections. */ 927 /* Set handlers for incoming connections. */ 928 async_set_client_data_constructor(devman_client_data_create); 929 async_set_client_data_destructor(devman_client_data_destroy); 889 930 async_set_client_connection(devman_connection); 890 931
Note:
See TracChangeset
for help on using the changeset viewer.