Changeset e2a6b72 in mainline for uspace/app
- Timestamp:
- 2012-10-15T16:28:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b3ab8f7
- Parents:
- 7eb49f4 (diff), c4c2406 (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/app
- Files:
-
- 15 added
- 16 edited
-
bdsh/Makefile (modified) (1 diff)
-
bdsh/cmds/modules/cmp/cmp.c (added)
-
bdsh/cmds/modules/cmp/cmp.h (added)
-
bdsh/cmds/modules/cmp/cmp_def.h (added)
-
bdsh/cmds/modules/cmp/entry.h (added)
-
bdsh/cmds/modules/modules.h (modified) (2 diffs)
-
bithenge/Makefile (added)
-
bithenge/Makefile.linux (added)
-
bithenge/test.c (added)
-
date/Makefile (added)
-
date/date.c (added)
-
devctl/devctl.c (modified) (1 diff)
-
logset/Makefile (added)
-
logset/main.c (added)
-
mkexfat/mkexfat.c (modified) (2 diffs)
-
msim/arch_helenos/input.c (modified) (2 diffs)
-
msim/arch_helenos/misc.c (modified) (1 diff)
-
tester/Makefile (modified) (1 diff)
-
tester/float/softfloat1.c (modified) (4 diffs)
-
tester/mm/common.c (modified) (1 diff)
-
tester/mm/mapping1.c (modified) (1 diff)
-
tester/stdio/logger1.c (added)
-
tester/stdio/logger1.def (added)
-
tester/stdio/logger2.c (added)
-
tester/stdio/logger2.def (added)
-
tester/tester.c (modified) (3 diffs)
-
tester/tester.h (modified) (1 diff)
-
trace/ipcp.c (modified) (10 diffs)
-
trace/proto.c (modified) (3 diffs)
-
trace/proto.h (modified) (1 diff)
-
vuhid/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/Makefile
r7eb49f4 re2a6b72 53 53 cmds/modules/unmount/unmount.c \ 54 54 cmds/modules/kcon/kcon.c \ 55 cmds/modules/cmp/cmp.c \ 55 56 cmds/builtins/batch/batch.c \ 56 57 cmds/builtins/exit/exit.c \ -
uspace/app/bdsh/cmds/modules/modules.h
r7eb49f4 re2a6b72 63 63 #include "printf/entry.h" 64 64 #include "echo/entry.h" 65 #include "cmp/entry.h" 65 66 66 67 /* Each .def function fills the module_t struct with the individual name, entry … … 86 87 #include "printf/printf_def.h" 87 88 #include "echo/echo_def.h" 89 #include "cmp/cmp_def.h" 88 90 89 91 {NULL, NULL, NULL, NULL} -
uspace/app/devctl/devctl.c
r7eb49f4 re2a6b72 151 151 rc = devman_fun_offline(funh); 152 152 if (rc != EOK) { 153 printf(NAME ": Failed to offline function '%s'.\n", path); 153 printf(NAME ": Failed to offline function '%s' (%s)\n", path, 154 str_error(rc)); 154 155 return rc; 155 156 } -
uspace/app/mkexfat/mkexfat.c
r7eb49f4 re2a6b72 49 49 #include <str.h> 50 50 #include <getopt.h> 51 #include <macros.h> 51 52 #include "exfat.h" 52 53 #include "upcase.h" … … 87 88 #define FIRST_FREE_CLUSTER 2 88 89 89 #define min(x, y) ((x) < (y) ? (x) : (y))90 90 91 91 typedef struct exfat_cfg { -
uspace/app/msim/arch_helenos/input.c
r7eb49f4 re2a6b72 32 32 /** @file HelenOS specific functions for MSIM simulator. 33 33 */ 34 35 /* Because of asprintf. */ 36 #define _GNU_SOURCE 34 37 #include "../../io/input.h" 35 38 #include "../../io/output.h" … … 38 41 #include <tinput.h> 39 42 #include <errno.h> 43 #include <stdlib.h> 40 44 41 45 static tinput_t *input_prompt; -
uspace/app/msim/arch_helenos/misc.c
r7eb49f4 re2a6b72 44 44 #include <ctype.h> 45 45 #include <stdio.h> 46 #include <stdlib.h> 46 47 47 48 /* Define when the dprinter device shall try to filter -
uspace/app/tester/Makefile
r7eb49f4 re2a6b72 45 45 stdio/stdio1.c \ 46 46 stdio/stdio2.c \ 47 stdio/logger1.c \ 48 stdio/logger2.c \ 47 49 fault/fault1.c \ 48 50 fault/fault2.c \ -
uspace/app/tester/float/softfloat1.c
r7eb49f4 re2a6b72 31 31 #include <sftypes.h> 32 32 #include <add.h> 33 #include <sub.h> 34 #include <mul.h> 35 #include <div.h> 33 36 #include <bool.h> 34 37 #include "../tester.h" 35 38 36 #define OPERANDS 539 #define OPERANDS 6 37 40 #define PRECISION 10000 38 41 … … 40 43 41 44 typedef int32_t cmptype_t; 42 43 static float float_op_a[OPERANDS] = 44 {3.5, -2.1, 100.0, 50.0, -1024.0}; 45 46 static float float_op_b[OPERANDS] = 47 {-2.1, 100.0, 50.0, -1024.0, 3.5}; 45 typedef void (* float_op_t)(float, float, float *, float_t *); 46 typedef void (* double_op_t)(double, double, double *, double_t *); 47 typedef void (* template_t)(void *, unsigned, unsigned, cmptype_t *, 48 cmptype_t *); 49 50 static float fop_a[OPERANDS] = 51 {3.5, -2.1, 100.0, 50.0, -1024.0, 0.0}; 52 53 static float fop_b[OPERANDS] = 54 {-2.1, 100.0, 50.0, -1024.0, 3.5, 0.0}; 55 56 static double dop_a[OPERANDS] = 57 {3.5, -2.1, 100.0, 50.0, -1024.0, 0.0}; 58 59 static double dop_b[OPERANDS] = 60 {-2.1, 100.0, 50.0, -1024.0, 3.5, 0.0}; 48 61 49 62 static cmptype_t cmpabs(cmptype_t a) … … 55 68 } 56 69 57 static bool test_float_add(void) 70 static void 71 float_template(void *f, unsigned i, unsigned j, cmptype_t *pic, 72 cmptype_t *pisc) 73 { 74 float c; 75 float_t sc; 76 77 float_op_t op = (float_op_t) f; 78 79 op(fop_a[i], fop_b[j], &c, &sc); 80 81 *pic = (cmptype_t) (c * PRECISION); 82 *pisc = (cmptype_t) (sc.val * PRECISION); 83 } 84 85 static void 86 double_template(void *f, unsigned i, unsigned j, cmptype_t *pic, 87 cmptype_t *pisc) 88 { 89 double c; 90 double_t sc; 91 92 double_op_t op = (double_op_t) f; 93 94 op(dop_a[i], dop_b[j], &c, &sc); 95 96 *pic = (cmptype_t) (c * PRECISION); 97 *pisc = (cmptype_t) (sc.val * PRECISION); 98 } 99 100 static bool test_template(template_t template, void *f) 58 101 { 59 102 bool correct = true; 60 103 61 104 for (unsigned int i = 0; i < OPERANDS; i++) { 62 for (unsigned int j = 0; j < OPERANDS; j++) { 63 float a = float_op_a[i]; 64 float b = float_op_b[j]; 65 float c = a + b; 66 67 float_t sa; 68 float_t sb; 69 float_t sc; 70 71 sa.val = float_op_a[i]; 72 sb.val = float_op_b[i]; 73 sc.data = add_float(sa.data, sb.data); 74 75 cmptype_t ic = (cmptype_t) (c * PRECISION); 76 cmptype_t isc = (cmptype_t) (sc.val * PRECISION); 105 for (unsigned int j = 0; j < OPERANDS; j++) { 106 cmptype_t ic; 107 cmptype_t isc; 108 109 template(f, i, j, &ic, &isc); 77 110 cmptype_t diff = cmpabs(ic - isc); 78 111 79 112 if (diff != 0) { 80 TPRINTF("i=%u, j=%u diff=%" PRIdCMPTYPE "\n", i, j, diff); 113 TPRINTF("i=%u, j=%u diff=%" PRIdCMPTYPE "\n", 114 i, j, diff); 81 115 correct = false; 82 116 } … … 87 121 } 88 122 123 static void float_add_operator(float a, float b, float *pc, float_t *psc) 124 { 125 *pc = a + b; 126 127 float_t sa; 128 float_t sb; 129 130 sa.val = a; 131 sb.val = b; 132 if (sa.data.parts.sign == sb.data.parts.sign) 133 psc->data = add_float(sa.data, sb.data); 134 else if (sa.data.parts.sign) { 135 sa.data.parts.sign = 0; 136 psc->data = sub_float(sb.data, sa.data); 137 } else { 138 sb.data.parts.sign = 0; 139 psc->data = sub_float(sa.data, sb.data); 140 } 141 } 142 143 static void float_mul_operator(float a, float b, float *pc, float_t *psc) 144 { 145 *pc = a * b; 146 147 float_t sa; 148 float_t sb; 149 150 sa.val = a; 151 sb.val = b; 152 psc->data = mul_float(sa.data, sb.data); 153 } 154 155 static void float_div_operator(float a, float b, float *pc, float_t *psc) 156 { 157 if ((cmptype_t) b == 0) { 158 *pc = 0.0; 159 psc->val = 0.0; 160 return; 161 } 162 163 *pc = a / b; 164 165 float_t sa; 166 float_t sb; 167 168 sa.val = a; 169 sb.val = b; 170 psc->data = div_float(sa.data, sb.data); 171 } 172 173 static void double_add_operator(double a, double b, double *pc, double_t *psc) 174 { 175 *pc = a + b; 176 177 double_t sa; 178 double_t sb; 179 180 sa.val = a; 181 sb.val = b; 182 if (sa.data.parts.sign == sb.data.parts.sign) 183 psc->data = add_double(sa.data, sb.data); 184 else if (sa.data.parts.sign) { 185 sa.data.parts.sign = 0; 186 psc->data = sub_double(sb.data, sa.data); 187 } else { 188 sb.data.parts.sign = 0; 189 psc->data = sub_double(sa.data, sb.data); 190 } 191 } 192 193 static void double_mul_operator(double a, double b, double *pc, double_t *psc) 194 { 195 *pc = a * b; 196 197 double_t sa; 198 double_t sb; 199 200 sa.val = a; 201 sb.val = b; 202 psc->data = mul_double(sa.data, sb.data); 203 } 204 205 static void double_div_operator(double a, double b, double *pc, double_t *psc) 206 { 207 if ((cmptype_t) b == 0) { 208 *pc = 0.0; 209 psc->val = 0.0; 210 return; 211 } 212 213 *pc = a / b; 214 215 double_t sa; 216 double_t sb; 217 218 sa.val = a; 219 sb.val = b; 220 psc->data = div_double(sa.data, sb.data); 221 } 222 89 223 const char *test_softfloat1(void) 90 224 { 91 if (!test_float_add()) 92 return "Float addition failed"; 93 94 return NULL; 95 } 225 const char *err = NULL; 226 227 if (!test_template(float_template, float_add_operator)) { 228 err = "Float addition failed"; 229 TPRINTF("%s\n", err); 230 } 231 if (!test_template(float_template, float_mul_operator)) { 232 err = "Float multiplication failed"; 233 TPRINTF("%s\n", err); 234 } 235 if (!test_template(float_template, float_div_operator)) { 236 err = "Float division failed"; 237 TPRINTF("%s\n", err); 238 } 239 if (!test_template(double_template, double_add_operator)) { 240 err = "Double addition failed"; 241 TPRINTF("%s\n", err); 242 } 243 if (!test_template(double_template, double_mul_operator)) { 244 err = "Double multiplication failed"; 245 TPRINTF("%s\n", err); 246 } 247 if (!test_template(double_template, double_div_operator)) { 248 err = "Double division failed"; 249 TPRINTF("%s\n", err); 250 } 251 252 return err; 253 } 254 -
uspace/app/tester/mm/common.c
r7eb49f4 re2a6b72 343 343 344 344 area->addr = as_area_create(AS_AREA_ANY, size, 345 AS_AREA_WRITE | AS_AREA_READ );345 AS_AREA_WRITE | AS_AREA_READ | AS_AREA_CACHEABLE); 346 346 if (area->addr == AS_MAP_FAILED) { 347 347 free(area); -
uspace/app/tester/mm/mapping1.c
r7eb49f4 re2a6b72 43 43 44 44 void *result = as_area_create(AS_AREA_ANY, size, 45 AS_AREA_READ | AS_AREA_WRITE );45 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 46 46 if (result == AS_MAP_FAILED) 47 47 return NULL; -
uspace/app/tester/tester.c
r7eb49f4 re2a6b72 39 39 #include <stdio.h> 40 40 #include <str.h> 41 #include <io/log.h> 41 42 #include "tester.h" 42 43 … … 55 56 #include "stdio/stdio1.def" 56 57 #include "stdio/stdio2.def" 58 #include "stdio/logger1.def" 59 #include "stdio/logger2.def" 57 60 #include "fault/fault1.def" 58 61 #include "fault/fault2.def" … … 140 143 } 141 144 145 log_init("tester"); 146 142 147 test_quiet = false; 143 148 test_argc = argc - 2; -
uspace/app/tester/tester.h
r7eb49f4 re2a6b72 88 88 extern const char *test_stdio1(void); 89 89 extern const char *test_stdio2(void); 90 extern const char *test_logger1(void); 91 extern const char *test_logger2(void); 90 92 extern const char *test_fault1(void); 91 93 extern const char *test_fault2(void); -
uspace/app/trace/ipcp.c
r7eb49f4 re2a6b72 38 38 #include <sys/typefmt.h> 39 39 #include <abi/ipc/methods.h> 40 #include <macros.h> 40 41 #include "ipc_desc.h" 41 42 #include "proto.h" … … 52 53 ipc_callid_t call_hash; 53 54 54 link_t link;55 ht_link_t link; 55 56 } pending_call_t; 56 57 … … 64 65 int have_conn[MAX_PHONE]; 65 66 66 #define PCALL_TABLE_CHAINS 32 67 hash_table_t pending_calls; 67 static hash_table_t pending_calls; 68 68 69 69 /* … … 73 73 proto_t *proto_unknown; /**< Protocol with no known methods. */ 74 74 75 static hash_index_t pending_call_hash(unsigned long key[]); 76 static int pending_call_compare(unsigned long key[], hash_count_t keys, 77 link_t *item); 78 static void pending_call_remove_callback(link_t *item); 79 80 hash_table_operations_t pending_call_ops = { 75 76 static size_t pending_call_key_hash(void *key) 77 { 78 ipc_callid_t *call_id = (ipc_callid_t *)key; 79 return *call_id; 80 } 81 82 static size_t pending_call_hash(const ht_link_t *item) 83 { 84 pending_call_t *hs = hash_table_get_inst(item, pending_call_t, link); 85 return hs->call_hash; 86 } 87 88 static bool pending_call_key_equal(void *key, const ht_link_t *item) 89 { 90 ipc_callid_t *call_id = (ipc_callid_t *)key; 91 pending_call_t *hs = hash_table_get_inst(item, pending_call_t, link); 92 93 return *call_id == hs->call_hash; 94 } 95 96 static hash_table_ops_t pending_call_ops = { 81 97 .hash = pending_call_hash, 82 .compare = pending_call_compare, 83 .remove_callback = pending_call_remove_callback 98 .key_hash = pending_call_key_hash, 99 .key_equal = pending_call_key_equal, 100 .equal = NULL, 101 .remove_callback = NULL 84 102 }; 85 86 87 static hash_index_t pending_call_hash(unsigned long key[])88 {89 // printf("pending_call_hash\n");90 return key[0] % PCALL_TABLE_CHAINS;91 }92 93 static int pending_call_compare(unsigned long key[], hash_count_t keys,94 link_t *item)95 {96 pending_call_t *hs;97 98 // printf("pending_call_compare\n");99 hs = hash_table_get_instance(item, pending_call_t, link);100 101 // FIXME: this will fail if sizeof(long) < sizeof(void *).102 return key[0] == hs->call_hash;103 }104 105 static void pending_call_remove_callback(link_t *item)106 {107 // printf("pending_call_remove_callback\n");108 }109 103 110 104 … … 177 171 } 178 172 179 hash_table_create(&pending_calls, PCALL_TABLE_CHAINS, 1, &pending_call_ops); 173 bool ok = hash_table_create(&pending_calls, 0, 0, &pending_call_ops); 174 assert(ok); 180 175 } 181 176 … … 190 185 pending_call_t *pcall; 191 186 proto_t *proto; 192 unsigned long key[1];193 187 oper_t *oper; 194 188 sysarg_t *args; … … 254 248 pcall->oper = oper; 255 249 256 key[0] = hash; 257 258 hash_table_insert(&pending_calls, key, &pcall->link); 250 hash_table_insert(&pending_calls, &pcall->link); 259 251 } 260 252 … … 334 326 void ipcp_call_in(ipc_call_t *call, ipc_callid_t hash) 335 327 { 336 link_t *item;328 ht_link_t *item; 337 329 pending_call_t *pcall; 338 unsigned long key[1];339 330 340 331 if ((hash & IPC_CALLID_ANSWERED) == 0 && hash != IPCP_CALLID_SYNC) { … … 347 338 348 339 hash = hash & ~IPC_CALLID_ANSWERED; 349 key[0] = hash; 350 351 item = hash_table_find(&pending_calls, key); 340 341 item = hash_table_find(&pending_calls, &hash); 352 342 if (item == NULL) 353 343 return; /* No matching question found */ … … 357 347 */ 358 348 359 pcall = hash_table_get_inst ance(item, pending_call_t, link);360 hash_table_remove(&pending_calls, key, 1);349 pcall = hash_table_get_inst(item, pending_call_t, link); 350 hash_table_remove(&pending_calls, &hash); 361 351 362 352 parse_answer(hash, pcall, call); -
uspace/app/trace/proto.c
r7eb49f4 re2a6b72 40 40 #include "proto.h" 41 41 42 #define SRV_PROTO_TABLE_CHAINS 32 43 #define METHOD_OPER_TABLE_CHAINS 32 44 45 hash_table_t srv_proto; 42 43 /* Maps service number to protocol */ 44 static hash_table_t srv_proto; 46 45 47 46 typedef struct { 48 unsignedsrv;47 int srv; 49 48 proto_t *proto; 50 link_t link;49 ht_link_t link; 51 50 } srv_proto_t; 52 51 53 52 typedef struct { 54 sysarg_t method;53 int method; 55 54 oper_t *oper; 56 link_t link;55 ht_link_t link; 57 56 } method_oper_t; 58 57 59 static hash_index_t srv_proto_hash(unsigned long key[]); 60 static int srv_proto_compare(unsigned long key[], hash_count_t keys, 61 link_t *item); 62 static void srv_proto_remove_callback(link_t *item); 63 64 hash_table_operations_t srv_proto_ops = { 58 /* Hash table operations. */ 59 60 static size_t srv_proto_key_hash(void *key) 61 { 62 return *(int *)key; 63 } 64 65 static size_t srv_proto_hash(const ht_link_t *item) 66 { 67 srv_proto_t *sp = hash_table_get_inst(item, srv_proto_t, link); 68 return sp->srv; 69 } 70 71 static bool srv_proto_key_equal(void *key, const ht_link_t *item) 72 { 73 srv_proto_t *sp = hash_table_get_inst(item, srv_proto_t, link); 74 return sp->srv == *(int *)key; 75 } 76 77 static hash_table_ops_t srv_proto_ops = { 65 78 .hash = srv_proto_hash, 66 .compare = srv_proto_compare, 67 .remove_callback = srv_proto_remove_callback 79 .key_hash = srv_proto_key_hash, 80 .key_equal = srv_proto_key_equal, 81 .equal = NULL, 82 .remove_callback = NULL 68 83 }; 69 84 70 static hash_index_t method_oper_hash(unsigned long key[]); 71 static int method_oper_compare(unsigned long key[], hash_count_t keys, 72 link_t *item); 73 static void method_oper_remove_callback(link_t *item); 74 75 hash_table_operations_t method_oper_ops = { 85 86 static size_t method_oper_key_hash(void *key) 87 { 88 return *(int *)key; 89 } 90 91 static size_t method_oper_hash(const ht_link_t *item) 92 { 93 method_oper_t *mo = hash_table_get_inst(item, method_oper_t, link); 94 return mo->method; 95 } 96 97 static bool method_oper_key_equal(void *key, const ht_link_t *item) 98 { 99 method_oper_t *mo = hash_table_get_inst(item, method_oper_t, link); 100 return mo->method == *(int *)key; 101 } 102 103 static hash_table_ops_t method_oper_ops = { 76 104 .hash = method_oper_hash, 77 .compare = method_oper_compare, 78 .remove_callback = method_oper_remove_callback 105 .key_hash = method_oper_key_hash, 106 .key_equal = method_oper_key_equal, 107 .equal = NULL, 108 .remove_callback = NULL 79 109 }; 80 110 81 static hash_index_t srv_proto_hash(unsigned long key[]) 82 { 83 return key[0] % SRV_PROTO_TABLE_CHAINS; 84 } 85 86 static int srv_proto_compare(unsigned long key[], hash_count_t keys, 87 link_t *item) 111 112 void proto_init(void) 113 { 114 /* todo: check return value. */ 115 bool ok = hash_table_create(&srv_proto, 0, 0, &srv_proto_ops); 116 assert(ok); 117 } 118 119 void proto_cleanup(void) 120 { 121 hash_table_destroy(&srv_proto); 122 } 123 124 void proto_register(int srv, proto_t *proto) 88 125 { 89 126 srv_proto_t *sp; 90 91 sp = hash_table_get_instance(item, srv_proto_t, link);92 93 return key[0] == sp->srv;94 }95 96 static void srv_proto_remove_callback(link_t *item)97 {98 }99 100 static hash_index_t method_oper_hash(unsigned long key[])101 {102 return key[0] % METHOD_OPER_TABLE_CHAINS;103 }104 105 static int method_oper_compare(unsigned long key[], hash_count_t keys,106 link_t *item)107 {108 method_oper_t *mo;109 110 mo = hash_table_get_instance(item, method_oper_t, link);111 112 return key[0] == mo->method;113 }114 115 static void method_oper_remove_callback(link_t *item)116 {117 }118 119 120 void proto_init(void)121 {122 hash_table_create(&srv_proto, SRV_PROTO_TABLE_CHAINS, 1,123 &srv_proto_ops);124 }125 126 void proto_cleanup(void)127 {128 hash_table_destroy(&srv_proto);129 }130 131 void proto_register(int srv, proto_t *proto)132 {133 srv_proto_t *sp;134 unsigned long key;135 127 136 128 sp = malloc(sizeof(srv_proto_t)); 137 129 sp->srv = srv; 138 130 sp->proto = proto; 139 key = srv; 140 141 hash_table_insert(&srv_proto, &key, &sp->link); 131 132 hash_table_insert(&srv_proto, &sp->link); 142 133 } 143 134 144 135 proto_t *proto_get_by_srv(int srv) 145 136 { 146 unsigned long key; 147 link_t *item; 148 srv_proto_t *sp; 149 150 key = srv; 151 item = hash_table_find(&srv_proto, &key); 137 ht_link_t *item = hash_table_find(&srv_proto, &srv); 152 138 if (item == NULL) return NULL; 153 139 154 s p = hash_table_get_instance(item, srv_proto_t, link);140 srv_proto_t *sp = hash_table_get_inst(item, srv_proto_t, link); 155 141 return sp->proto; 156 142 } … … 159 145 { 160 146 proto->name = name; 161 hash_table_create(&proto->method_oper, SRV_PROTO_TABLE_CHAINS, 1, 162 &method_oper_ops); 147 /* todo: check return value. */ 148 bool ok = hash_table_create(&proto->method_oper, 0, 0, &method_oper_ops); 149 assert(ok); 163 150 } 164 151 … … 181 168 { 182 169 method_oper_t *mo; 183 unsigned long key;184 170 185 171 mo = malloc(sizeof(method_oper_t)); 186 172 mo->method = method; 187 173 mo->oper = oper; 188 key = method; 189 190 hash_table_insert(&proto->method_oper, &key, &mo->link); 174 175 hash_table_insert(&proto->method_oper, &mo->link); 191 176 } 192 177 193 178 oper_t *proto_get_oper(proto_t *proto, int method) 194 179 { 195 unsigned long key; 196 link_t *item; 197 method_oper_t *mo; 198 199 key = method; 200 item = hash_table_find(&proto->method_oper, &key); 180 ht_link_t *item = hash_table_find(&proto->method_oper, &method); 201 181 if (item == NULL) return NULL; 202 182 203 m o = hash_table_get_instance(item, method_oper_t, link);183 method_oper_t *mo = hash_table_get_inst(item, method_oper_t, link); 204 184 return mo->oper; 205 185 } -
uspace/app/trace/proto.h
r7eb49f4 re2a6b72 62 62 } proto_t; 63 63 64 /* Maps service number to protocol */65 extern hash_table_t srv_proto;66 64 67 65 extern void proto_init(void); -
uspace/app/vuhid/main.c
r7eb49f4 re2a6b72 155 155 int rc; 156 156 157 usb_log_enable(USB_LOG_LEVEL_DEBUG2, "vusbhid");157 log_init("vuhid"); 158 158 159 159 fibril_mutex_initialize(&vuhid_data.iface_count_mutex);
Note:
See TracChangeset
for help on using the changeset viewer.
