Changeset 09b859c in mainline for kernel/generic/src
- Timestamp:
- 2010-07-07T18:37:44Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 77385fe
- Parents:
- e2ea4ab1 (diff), 22c3444 (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:
- kernel/generic/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/btree.c
re2ea4ab1 r09b859c 53 53 #include <panic.h> 54 54 #include <print.h> 55 #include <trace.h> 55 56 56 57 static slab_cache_t *btree_node_slab; … … 79 80 * 80 81 */ 81 static void node_initialize(btree_node_t *node)82 NO_TRACE static void node_initialize(btree_node_t *node) 82 83 { 83 84 unsigned int i; … … 118 119 * 119 120 */ 120 static void btree_destroy_subtree(btree_node_t *root)121 NO_TRACE static void btree_destroy_subtree(btree_node_t *root) 121 122 { 122 123 size_t i; … … 151 152 * 152 153 */ 153 static void node_insert_key_and_rsubtree(btree_node_t *node, btree_key_t key,154 void *value, btree_node_t *rsubtree)154 NO_TRACE static void node_insert_key_and_rsubtree(btree_node_t *node, 155 btree_key_t key, void *value, btree_node_t *rsubtree) 155 156 { 156 157 size_t i; … … 186 187 * 187 188 */ 188 static size_t find_key_by_subtree(btree_node_t *node, btree_node_t *subtree,189 b ool right)189 NO_TRACE static size_t find_key_by_subtree(btree_node_t *node, 190 btree_node_t *subtree, bool right) 190 191 { 191 192 size_t i; … … 209 210 * 210 211 */ 211 static void node_remove_key_and_lsubtree(btree_node_t *node, btree_key_t key) 212 NO_TRACE static void node_remove_key_and_lsubtree(btree_node_t *node, 213 btree_key_t key) 212 214 { 213 215 size_t i; … … 242 244 * 243 245 */ 244 static void node_remove_key_and_rsubtree(btree_node_t *node, btree_key_t key) 246 NO_TRACE static void node_remove_key_and_rsubtree(btree_node_t *node, 247 btree_key_t key) 245 248 { 246 249 size_t i, j; … … 273 276 * 274 277 */ 275 static void node_insert_key_and_lsubtree(btree_node_t *node, btree_key_t key,276 void *value, btree_node_t *lsubtree)278 NO_TRACE static void node_insert_key_and_lsubtree(btree_node_t *node, 279 btree_key_t key, void *value, btree_node_t *lsubtree) 277 280 { 278 281 size_t i; … … 313 316 * 314 317 */ 315 static void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, size_t idx) 318 NO_TRACE static void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, 319 size_t idx) 316 320 { 317 321 btree_key_t key = lnode->key[lnode->keys - 1]; … … 348 352 * 349 353 */ 350 static void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, size_t idx) 354 NO_TRACE static void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, 355 size_t idx) 351 356 { 352 357 btree_key_t key = rnode->key[0]; … … 385 390 * 386 391 */ 387 static bool try_insert_by_rotation_to_left(btree_node_t *node,392 NO_TRACE static bool try_insert_by_rotation_to_left(btree_node_t *node, 388 393 btree_key_t inskey, void *insvalue, btree_node_t *rsubtree) 389 394 { … … 434 439 * 435 440 */ 436 static bool try_insert_by_rotation_to_right(btree_node_t *node,441 NO_TRACE static bool try_insert_by_rotation_to_right(btree_node_t *node, 437 442 btree_key_t inskey, void *insvalue, btree_node_t *rsubtree) 438 443 { … … 488 493 * 489 494 */ 490 static btree_node_t *node_split(btree_node_t *node, btree_key_t key,495 NO_TRACE static btree_node_t *node_split(btree_node_t *node, btree_key_t key, 491 496 void *value, btree_node_t *rsubtree, btree_key_t *median) 492 497 { … … 552 557 * 553 558 */ 554 static void _btree_insert(btree_t *t, btree_key_t key, void *value,559 NO_TRACE static void _btree_insert(btree_t *t, btree_key_t key, void *value, 555 560 btree_node_t *rsubtree, btree_node_t *node) 556 561 { … … 639 644 * 640 645 */ 641 static bool try_rotation_from_left(btree_node_t *rnode)646 NO_TRACE static bool try_rotation_from_left(btree_node_t *rnode) 642 647 { 643 648 size_t idx; … … 676 681 * 677 682 */ 678 static bool try_rotation_from_right(btree_node_t *lnode)683 NO_TRACE static bool try_rotation_from_right(btree_node_t *lnode) 679 684 { 680 685 size_t idx; … … 714 719 * 715 720 */ 716 static btree_node_t *node_combine(btree_node_t *node)721 NO_TRACE static btree_node_t *node_combine(btree_node_t *node) 717 722 { 718 723 size_t idx; … … 764 769 * 765 770 */ 766 static void _btree_remove(btree_t *t, btree_key_t key, btree_node_t *node) 771 NO_TRACE static void _btree_remove(btree_t *t, btree_key_t key, 772 btree_node_t *node) 767 773 { 768 774 if (ROOT_NODE(node)) { -
kernel/generic/src/console/kconsole.c
re2ea4ab1 r09b859c 160 160 161 161 /** Print count times a character */ 162 static void print_cc(wchar_t ch, size_t count)162 NO_TRACE static void print_cc(wchar_t ch, size_t count) 163 163 { 164 164 size_t i; … … 168 168 169 169 /** Try to find a command beginning with prefix */ 170 static const char *cmdtab_search_one(const char *name, link_t **startpos) 170 NO_TRACE static const char *cmdtab_search_one(const char *name, 171 link_t **startpos) 171 172 { 172 173 size_t namelen = str_length(name); … … 202 203 * 203 204 */ 204 static int cmdtab_compl(char *input, size_t size)205 NO_TRACE static int cmdtab_compl(char *input, size_t size) 205 206 { 206 207 const char *name = input; … … 237 238 } 238 239 239 static wchar_t *clever_readline(const char *prompt, indev_t *indev)240 NO_TRACE static wchar_t *clever_readline(const char *prompt, indev_t *indev) 240 241 { 241 242 printf("%s> ", prompt); … … 422 423 } 423 424 424 static bool parse_int_arg(const char *text, size_t len, unative_t *result) 425 NO_TRACE static bool parse_int_arg(const char *text, size_t len, 426 unative_t *result) 425 427 { 426 428 bool isaddr = false; … … 507 509 * 508 510 */ 509 static bool parse_argument(const char *cmdline, size_t size, size_t *start, size_t *end) 511 NO_TRACE static bool parse_argument(const char *cmdline, size_t size, 512 size_t *start, size_t *end) 510 513 { 511 514 ASSERT(start != NULL); … … 543 546 * 544 547 */ 545 static cmd_info_t *parse_cmdline(const char *cmdline, size_t size)548 NO_TRACE static cmd_info_t *parse_cmdline(const char *cmdline, size_t size) 546 549 { 547 550 size_t start = 0; -
kernel/generic/src/ddi/ddi.c
re2ea4ab1 r09b859c 52 52 #include <align.h> 53 53 #include <errno.h> 54 #include <trace.h> 54 55 55 56 /** This lock protects the parea_btree. */ … … 99 100 * 100 101 */ 101 static int ddi_physmem_map(uintptr_t pf, uintptr_t vp, size_t pages,102 NO_TRACE static int ddi_physmem_map(uintptr_t pf, uintptr_t vp, size_t pages, 102 103 unsigned int flags) 103 104 { … … 187 188 * 188 189 */ 189 static int ddi_iospace_enable(task_id_t id, uintptr_t ioaddr, size_t size) 190 NO_TRACE static int ddi_iospace_enable(task_id_t id, uintptr_t ioaddr, 191 size_t size) 190 192 { 191 193 /* -
kernel/generic/src/interrupt/interrupt.c
re2ea4ab1 r09b859c 55 55 #include <arch/cycle.h> 56 56 #include <str.h> 57 #include <trace.h> 57 58 58 59 exc_table_t exc_table[IVT_ITEMS]; … … 97 98 * 98 99 */ 99 void exc_dispatch(unsigned int n, istate_t *istate) 100 { 101 ASSERT(CPU); 102 100 NO_TRACE void exc_dispatch(unsigned int n, istate_t *istate) 101 { 103 102 #if (IVT_ITEMS > 0) 104 103 ASSERT(n < IVT_ITEMS); … … 113 112 114 113 /* Account CPU usage if it has waked up from sleep */ 115 irq_spinlock_lock(&CPU->lock, false); 116 if (CPU->idle) { 117 uint64_t now = get_cycle(); 118 CPU->idle_cycles += now - CPU->last_cycle; 119 CPU->last_cycle = now; 120 CPU->idle = false; 121 } 122 irq_spinlock_unlock(&CPU->lock, false); 114 if (CPU) { 115 irq_spinlock_lock(&CPU->lock, false); 116 if (CPU->idle) { 117 uint64_t now = get_cycle(); 118 CPU->idle_cycles += now - CPU->last_cycle; 119 CPU->last_cycle = now; 120 CPU->idle = false; 121 } 122 irq_spinlock_unlock(&CPU->lock, false); 123 } 123 124 124 125 uint64_t begin_cycle = get_cycle(); … … 159 160 * 160 161 */ 161 static void exc_undef(unsigned int n, istate_t *istate)162 NO_TRACE static void exc_undef(unsigned int n, istate_t *istate) 162 163 { 163 164 fault_if_from_uspace(istate, "Unhandled exception %u.", n); … … 168 169 * 169 170 */ 170 void fault_if_from_uspace(istate_t *istate, const char *fmt, ...)171 NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 171 172 { 172 173 if (!istate_from_uspace(istate)) … … 215 216 * 216 217 */ 217 static int cmd_exc_print(cmd_arg_t *argv)218 NO_TRACE static int cmd_exc_print(cmd_arg_t *argv) 218 219 { 219 220 bool excs_all; -
kernel/generic/src/main/main.c
re2ea4ab1 r09b859c 131 131 * 132 132 */ 133 void __attribute__((no_instrument_function))main_bsp(void)133 NO_TRACE void main_bsp(void) 134 134 { 135 135 config.cpu_count = 1; -
kernel/generic/src/mm/as.c
re2ea4ab1 r09b859c 116 116 as_t *AS_KERNEL = NULL; 117 117 118 static int as_constructor(void *obj, unsigned int flags)118 NO_TRACE static int as_constructor(void *obj, unsigned int flags) 119 119 { 120 120 as_t *as = (as_t *) obj; … … 128 128 } 129 129 130 static size_t as_destructor(void *obj)130 NO_TRACE static size_t as_destructor(void *obj) 131 131 { 132 132 as_t *as = (as_t *) obj; … … 274 274 * 275 275 */ 276 void as_hold(as_t *as)276 NO_TRACE void as_hold(as_t *as) 277 277 { 278 278 atomic_inc(&as->refcount); … … 287 287 * 288 288 */ 289 void as_release(as_t *as)289 NO_TRACE void as_release(as_t *as) 290 290 { 291 291 if (atomic_predec(&as->refcount) == 0) … … 303 303 * 304 304 */ 305 static bool check_area_conflicts(as_t *as, uintptr_t va, size_t size,305 NO_TRACE static bool check_area_conflicts(as_t *as, uintptr_t va, size_t size, 306 306 as_area_t *avoid_area) 307 307 { … … 463 463 * 464 464 */ 465 static as_area_t *find_area_and_lock(as_t *as, uintptr_t va)465 NO_TRACE static as_area_t *find_area_and_lock(as_t *as, uintptr_t va) 466 466 { 467 467 ASSERT(mutex_locked(&as->lock)); … … 717 717 * 718 718 */ 719 static void sh_info_remove_reference(share_info_t *sh_info)719 NO_TRACE static void sh_info_remove_reference(share_info_t *sh_info) 720 720 { 721 721 bool dealloc = false; … … 987 987 * 988 988 */ 989 bool as_area_check_access(as_area_t *area, pf_access_t access)989 NO_TRACE bool as_area_check_access(as_area_t *area, pf_access_t access) 990 990 { 991 991 int flagmap[] = { … … 1010 1010 * 1011 1011 */ 1012 static unsigned int area_flags_to_page_flags(unsigned int aflags)1012 NO_TRACE static unsigned int area_flags_to_page_flags(unsigned int aflags) 1013 1013 { 1014 1014 unsigned int flags = PAGE_USER | PAGE_PRESENT; … … 1385 1385 } 1386 1386 1387 1388 1389 1387 /** Compute flags for virtual address translation subsytem. 1390 1388 * … … 1394 1392 * 1395 1393 */ 1396 unsigned int as_area_get_flags(as_area_t *area)1394 NO_TRACE unsigned int as_area_get_flags(as_area_t *area) 1397 1395 { 1398 1396 ASSERT(mutex_locked(&area->lock)); … … 1412 1410 * 1413 1411 */ 1414 pte_t *page_table_create(unsigned int flags)1412 NO_TRACE pte_t *page_table_create(unsigned int flags) 1415 1413 { 1416 1414 ASSERT(as_operations); … … 1427 1425 * 1428 1426 */ 1429 void page_table_destroy(pte_t *page_table)1427 NO_TRACE void page_table_destroy(pte_t *page_table) 1430 1428 { 1431 1429 ASSERT(as_operations); … … 1448 1446 * 1449 1447 */ 1450 void page_table_lock(as_t *as, bool lock)1448 NO_TRACE void page_table_lock(as_t *as, bool lock) 1451 1449 { 1452 1450 ASSERT(as_operations); … … 1462 1460 * 1463 1461 */ 1464 void page_table_unlock(as_t *as, bool unlock)1462 NO_TRACE void page_table_unlock(as_t *as, bool unlock) 1465 1463 { 1466 1464 ASSERT(as_operations); … … 1477 1475 * are locked, otherwise false. 1478 1476 */ 1479 bool page_table_locked(as_t *as)1477 NO_TRACE bool page_table_locked(as_t *as) 1480 1478 { 1481 1479 ASSERT(as_operations); -
kernel/generic/src/mm/frame.c
re2ea4ab1 r09b859c 75 75 /********************/ 76 76 77 static inline size_t frame_index(zone_t *zone, frame_t *frame)77 NO_TRACE static inline size_t frame_index(zone_t *zone, frame_t *frame) 78 78 { 79 79 return (size_t) (frame - zone->frames); 80 80 } 81 81 82 static inline size_t frame_index_abs(zone_t *zone, frame_t *frame)82 NO_TRACE static inline size_t frame_index_abs(zone_t *zone, frame_t *frame) 83 83 { 84 84 return (size_t) (frame - zone->frames) + zone->base; 85 85 } 86 86 87 static inline bool frame_index_valid(zone_t *zone, size_t index)87 NO_TRACE static inline bool frame_index_valid(zone_t *zone, size_t index) 88 88 { 89 89 return (index < zone->count); 90 90 } 91 91 92 static inline size_t make_frame_index(zone_t *zone, frame_t *frame)92 NO_TRACE static inline size_t make_frame_index(zone_t *zone, frame_t *frame) 93 93 { 94 94 return (frame - zone->frames); … … 100 100 * 101 101 */ 102 static void frame_initialize(frame_t *frame)102 NO_TRACE static void frame_initialize(frame_t *frame) 103 103 { 104 104 frame->refcount = 1; … … 121 121 * 122 122 */ 123 static size_t zones_insert_zone(pfn_t base, size_t count)123 NO_TRACE static size_t zones_insert_zone(pfn_t base, size_t count) 124 124 { 125 125 if (zones.count + 1 == ZONES_MAX) { … … 133 133 if (overlaps(base, count, 134 134 zones.info[i].base, zones.info[i].count)) { 135 printf("Zones overlap!\n"); 135 printf("Zone (%p, %p) overlaps with zone (%p, %p)!\n", 136 PFN2ADDR(base), PFN2ADDR(base + count), 137 PFN2ADDR(zones.info[i].base), 138 PFN2ADDR(zones.info[i].base + zones.info[i].count)); 136 139 return (size_t) -1; 137 140 } … … 162 165 */ 163 166 #ifdef CONFIG_DEBUG 164 static size_t total_frames_free(void)167 NO_TRACE static size_t total_frames_free(void) 165 168 { 166 169 size_t total = 0; … … 185 188 * 186 189 */ 187 size_t find_zone(pfn_t frame, size_t count, size_t hint)190 NO_TRACE size_t find_zone(pfn_t frame, size_t count, size_t hint) 188 191 { 189 192 if (hint >= zones.count) … … 206 209 207 210 /** @return True if zone can allocate specified order */ 208 static bool zone_can_alloc(zone_t *zone, uint8_t order)211 NO_TRACE static bool zone_can_alloc(zone_t *zone, uint8_t order) 209 212 { 210 213 return (zone_flags_available(zone->flags) … … 222 225 * 223 226 */ 224 static size_t find_free_zone(uint8_t order, zone_flags_t flags, size_t hint) 227 NO_TRACE static size_t find_free_zone(uint8_t order, zone_flags_t flags, 228 size_t hint) 225 229 { 226 230 if (hint >= zones.count) … … 262 266 * 263 267 */ 264 static link_t *zone_buddy_find_block(buddy_system_t *buddy, link_t *child,265 uint8_t order)268 NO_TRACE static link_t *zone_buddy_find_block(buddy_system_t *buddy, 269 link_t *child, uint8_t order) 266 270 { 267 271 frame_t *frame = list_get_instance(child, frame_t, buddy_link); … … 285 289 * 286 290 */ 287 static link_t *zone_buddy_find_buddy(buddy_system_t *buddy, link_t *block) 291 NO_TRACE static link_t *zone_buddy_find_buddy(buddy_system_t *buddy, 292 link_t *block) 288 293 { 289 294 frame_t *frame = list_get_instance(block, frame_t, buddy_link); … … 321 326 * 322 327 */ 323 static link_t *zone_buddy_bisect(buddy_system_t *buddy, link_t *block)328 NO_TRACE static link_t *zone_buddy_bisect(buddy_system_t *buddy, link_t *block) 324 329 { 325 330 frame_t *frame_l = list_get_instance(block, frame_t, buddy_link); … … 339 344 * 340 345 */ 341 static link_t *zone_buddy_coalesce(buddy_system_t *buddy, link_t *block_1,342 link_t *block_ 2)346 NO_TRACE static link_t *zone_buddy_coalesce(buddy_system_t *buddy, 347 link_t *block_1, link_t *block_2) 343 348 { 344 349 frame_t *frame1 = list_get_instance(block_1, frame_t, buddy_link); … … 355 360 * 356 361 */ 357 static void zone_buddy_set_order(buddy_system_t *buddy, link_t *block,362 NO_TRACE static void zone_buddy_set_order(buddy_system_t *buddy, link_t *block, 358 363 uint8_t order) 359 364 { … … 369 374 * 370 375 */ 371 static uint8_t zone_buddy_get_order(buddy_system_t *buddy, link_t *block) 376 NO_TRACE static uint8_t zone_buddy_get_order(buddy_system_t *buddy, 377 link_t *block) 372 378 { 373 379 return list_get_instance(block, frame_t, buddy_link)->buddy_order; … … 380 386 * 381 387 */ 382 static void zone_buddy_mark_busy(buddy_system_t *buddy, link_t *block)388 NO_TRACE static void zone_buddy_mark_busy(buddy_system_t *buddy, link_t *block) 383 389 { 384 390 list_get_instance(block, frame_t, buddy_link)->refcount = 1; … … 389 395 * @param buddy Buddy system. 390 396 * @param block Buddy system block. 391 */ 392 static void zone_buddy_mark_available(buddy_system_t *buddy, link_t *block) 397 * 398 */ 399 NO_TRACE static void zone_buddy_mark_available(buddy_system_t *buddy, 400 link_t *block) 393 401 { 394 402 list_get_instance(block, frame_t, buddy_link)->refcount = 0; … … 421 429 * 422 430 */ 423 static pfn_t zone_frame_alloc(zone_t *zone, uint8_t order)431 NO_TRACE static pfn_t zone_frame_alloc(zone_t *zone, uint8_t order) 424 432 { 425 433 ASSERT(zone_flags_available(zone->flags)); … … 449 457 * 450 458 */ 451 static void zone_frame_free(zone_t *zone, size_t frame_idx)459 NO_TRACE static void zone_frame_free(zone_t *zone, size_t frame_idx) 452 460 { 453 461 ASSERT(zone_flags_available(zone->flags)); … … 470 478 471 479 /** Return frame from zone. */ 472 static frame_t *zone_get_frame(zone_t *zone, size_t frame_idx)480 NO_TRACE static frame_t *zone_get_frame(zone_t *zone, size_t frame_idx) 473 481 { 474 482 ASSERT(frame_idx < zone->count); … … 477 485 478 486 /** Mark frame in zone unavailable to allocation. */ 479 static void zone_mark_unavailable(zone_t *zone, size_t frame_idx)487 NO_TRACE static void zone_mark_unavailable(zone_t *zone, size_t frame_idx) 480 488 { 481 489 ASSERT(zone_flags_available(zone->flags)); … … 506 514 * 507 515 */ 508 static void zone_merge_internal(size_t z1, size_t z2, zone_t *old_z1, buddy_system_t *buddy) 516 NO_TRACE static void zone_merge_internal(size_t z1, size_t z2, zone_t *old_z1, 517 buddy_system_t *buddy) 509 518 { 510 519 ASSERT(zone_flags_available(zones.info[z1].flags)); … … 602 611 * 603 612 */ 604 static void return_config_frames(size_t znum, pfn_t pfn, size_t count)613 NO_TRACE static void return_config_frames(size_t znum, pfn_t pfn, size_t count) 605 614 { 606 615 ASSERT(zone_flags_available(zones.info[znum].flags)); … … 637 646 * 638 647 */ 639 static void zone_reduce_region(size_t znum, pfn_t frame_idx, size_t count) 648 NO_TRACE static void zone_reduce_region(size_t znum, pfn_t frame_idx, 649 size_t count) 640 650 { 641 651 ASSERT(zone_flags_available(zones.info[znum].flags)); … … 777 787 * 778 788 */ 779 static void zone_construct(zone_t *zone, buddy_system_t *buddy, pfn_t start,780 size_t count, zone_flags_t flags)789 NO_TRACE static void zone_construct(zone_t *zone, buddy_system_t *buddy, 790 pfn_t start, size_t count, zone_flags_t flags) 781 791 { 782 792 zone->base = start; … … 821 831 * 822 832 */ 823 uintptr_t zone_conf_size(size_t count)833 size_t zone_conf_size(size_t count) 824 834 { 825 835 return (count * sizeof(frame_t) + buddy_conf_size(fnzb(count))); … … 1108 1118 * 1109 1119 */ 1110 void frame_reference_add(pfn_t pfn)1120 NO_TRACE void frame_reference_add(pfn_t pfn) 1111 1121 { 1112 1122 irq_spinlock_lock(&zones.lock, true); … … 1127 1137 * 1128 1138 */ 1129 void frame_mark_unavailable(pfn_t start, size_t count)1139 NO_TRACE void frame_mark_unavailable(pfn_t start, size_t count) 1130 1140 { 1131 1141 irq_spinlock_lock(&zones.lock, true); -
kernel/generic/src/mm/page.c
re2ea4ab1 r09b859c 115 115 * 116 116 */ 117 void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame,117 NO_TRACE void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame, 118 118 unsigned int flags) 119 119 { … … 139 139 * 140 140 */ 141 void page_mapping_remove(as_t *as, uintptr_t page)141 NO_TRACE void page_mapping_remove(as_t *as, uintptr_t page) 142 142 { 143 143 ASSERT(page_table_locked(as)); … … 163 163 * 164 164 */ 165 pte_t *page_mapping_find(as_t *as, uintptr_t page)165 NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page) 166 166 { 167 167 ASSERT(page_table_locked(as)); -
kernel/generic/src/mm/slab.c
re2ea4ab1 r09b859c 177 177 * 178 178 */ 179 static slab_t *slab_space_alloc(slab_cache_t *cache, unsigned int flags) 179 NO_TRACE static slab_t *slab_space_alloc(slab_cache_t *cache, 180 unsigned int flags) 180 181 { 181 182 … … 224 225 * 225 226 */ 226 static size_t slab_space_free(slab_cache_t *cache, slab_t *slab)227 NO_TRACE static size_t slab_space_free(slab_cache_t *cache, slab_t *slab) 227 228 { 228 229 frame_free(KA2PA(slab->start)); … … 236 237 237 238 /** Map object to slab structure */ 238 static slab_t *obj2slab(void *obj)239 NO_TRACE static slab_t *obj2slab(void *obj) 239 240 { 240 241 return (slab_t *) frame_get_parent(ADDR2PFN(KA2PA(obj)), 0); … … 252 253 * 253 254 */ 254 static size_t slab_obj_destroy(slab_cache_t *cache, void *obj, slab_t *slab) 255 NO_TRACE static size_t slab_obj_destroy(slab_cache_t *cache, void *obj, 256 slab_t *slab) 255 257 { 256 258 if (!slab) … … 293 295 * 294 296 */ 295 static void *slab_obj_create(slab_cache_t *cache,int flags)297 NO_TRACE static void *slab_obj_create(slab_cache_t *cache, unsigned int flags) 296 298 { 297 299 spinlock_lock(&cache->slablock); … … 349 351 * 350 352 */ 351 static slab_magazine_t *get_mag_from_cache(slab_cache_t *cache, bool first) 353 NO_TRACE static slab_magazine_t *get_mag_from_cache(slab_cache_t *cache, 354 bool first) 352 355 { 353 356 slab_magazine_t *mag = NULL; … … 373 376 * 374 377 */ 375 static void put_mag_to_cache(slab_cache_t *cache, slab_magazine_t *mag) 378 NO_TRACE static void put_mag_to_cache(slab_cache_t *cache, 379 slab_magazine_t *mag) 376 380 { 377 381 spinlock_lock(&cache->maglock); … … 388 392 * 389 393 */ 390 static size_t magazine_destroy(slab_cache_t *cache, slab_magazine_t *mag) 394 NO_TRACE static size_t magazine_destroy(slab_cache_t *cache, 395 slab_magazine_t *mag) 391 396 { 392 397 size_t i; … … 406 411 * 407 412 */ 408 static slab_magazine_t *get_full_current_mag(slab_cache_t *cache)413 NO_TRACE static slab_magazine_t *get_full_current_mag(slab_cache_t *cache) 409 414 { 410 415 slab_magazine_t *cmag = cache->mag_cache[CPU->id].current; 411 416 slab_magazine_t *lastmag = cache->mag_cache[CPU->id].last; 412 417 413 418 ASSERT(spinlock_locked(&cache->mag_cache[CPU->id].lock)); 414 419 … … 443 448 * 444 449 */ 445 static void *magazine_obj_get(slab_cache_t *cache)450 NO_TRACE static void *magazine_obj_get(slab_cache_t *cache) 446 451 { 447 452 if (!CPU) … … 473 478 * 474 479 */ 475 static slab_magazine_t *make_empty_current_mag(slab_cache_t *cache)480 NO_TRACE static slab_magazine_t *make_empty_current_mag(slab_cache_t *cache) 476 481 { 477 482 slab_magazine_t *cmag = cache->mag_cache[CPU->id].current; … … 479 484 480 485 ASSERT(spinlock_locked(&cache->mag_cache[CPU->id].lock)); 481 486 482 487 if (cmag) { 483 488 if (cmag->busy < cmag->size) … … 523 528 * 524 529 */ 525 static int magazine_obj_put(slab_cache_t *cache, void *obj)530 NO_TRACE static int magazine_obj_put(slab_cache_t *cache, void *obj) 526 531 { 527 532 if (!CPU) … … 552 557 * 553 558 */ 554 static size_t comp_objects(slab_cache_t *cache)559 NO_TRACE static size_t comp_objects(slab_cache_t *cache) 555 560 { 556 561 if (cache->flags & SLAB_CACHE_SLINSIDE) … … 564 569 * 565 570 */ 566 static size_t badness(slab_cache_t *cache)571 NO_TRACE static size_t badness(slab_cache_t *cache) 567 572 { 568 573 size_t objects = comp_objects(cache); … … 578 583 * 579 584 */ 580 static bool make_magcache(slab_cache_t *cache)585 NO_TRACE static bool make_magcache(slab_cache_t *cache) 581 586 { 582 587 ASSERT(_slab_initialized >= 2); … … 600 605 * 601 606 */ 602 static void _slab_cache_create(slab_cache_t *cache, const char *name,607 NO_TRACE static void _slab_cache_create(slab_cache_t *cache, const char *name, 603 608 size_t size, size_t align, int (*constructor)(void *obj, 604 609 unsigned int kmflag), size_t (*destructor)(void *obj), unsigned int flags) … … 676 681 * 677 682 */ 678 static size_t _slab_reclaim(slab_cache_t *cache, unsigned int flags)683 NO_TRACE static size_t _slab_reclaim(slab_cache_t *cache, unsigned int flags) 679 684 { 680 685 if (cache->flags & SLAB_CACHE_NOMAGAZINE) … … 781 786 * 782 787 */ 783 static void _slab_free(slab_cache_t *cache, void *obj, slab_t *slab)788 NO_TRACE static void _slab_free(slab_cache_t *cache, void *obj, slab_t *slab) 784 789 { 785 790 ipl_t ipl = interrupts_disable(); -
kernel/generic/src/proc/the.c
re2ea4ab1 r09b859c 49 49 * 50 50 * @param the THE structure to be initialized. 51 * 51 52 */ 52 53 void the_initialize(the_t *the) … … 65 66 * @param src The source THE structure. 66 67 * @param dst The destination THE structure. 68 * 67 69 */ 68 void the_copy(the_t *src, the_t *dst)70 NO_TRACE void the_copy(the_t *src, the_t *dst) 69 71 { 70 72 *dst = *src; -
kernel/generic/src/sysinfo/sysinfo.c
re2ea4ab1 r09b859c 58 58 * 59 59 */ 60 static int sysinfo_item_constructor(void *obj, unsigned int kmflag)60 NO_TRACE static int sysinfo_item_constructor(void *obj, unsigned int kmflag) 61 61 { 62 62 sysinfo_item_t *item = (sysinfo_item_t *) obj; … … 78 78 * 79 79 */ 80 static size_t sysinfo_item_destructor(void *obj)80 NO_TRACE static size_t sysinfo_item_destructor(void *obj) 81 81 { 82 82 sysinfo_item_t *item = (sysinfo_item_t *) obj; … … 120 120 * 121 121 */ 122 static sysinfo_item_t *sysinfo_find_item(const char *name,122 NO_TRACE static sysinfo_item_t *sysinfo_find_item(const char *name, 123 123 sysinfo_item_t *subtree, sysinfo_return_t **ret, bool dry_run) 124 124 { … … 180 180 * 181 181 */ 182 static sysinfo_item_t *sysinfo_create_path(const char *name,182 NO_TRACE static sysinfo_item_t *sysinfo_create_path(const char *name, 183 183 sysinfo_item_t **psubtree) 184 184 { … … 458 458 * 459 459 */ 460 static void sysinfo_indent(unsigned int depth)460 NO_TRACE static void sysinfo_indent(unsigned int depth) 461 461 { 462 462 unsigned int i; … … 473 473 * 474 474 */ 475 static void sysinfo_dump_internal(sysinfo_item_t *root, unsigned int depth)475 NO_TRACE static void sysinfo_dump_internal(sysinfo_item_t *root, unsigned int depth) 476 476 { 477 477 sysinfo_item_t *cur = root; … … 567 567 * 568 568 */ 569 static sysinfo_return_t sysinfo_get_item(const char *name,569 NO_TRACE static sysinfo_return_t sysinfo_get_item(const char *name, 570 570 sysinfo_item_t **root, bool dry_run) 571 571 { … … 622 622 * 623 623 */ 624 static sysinfo_return_t sysinfo_get_item_uspace(void *ptr, size_t size,624 NO_TRACE static sysinfo_return_t sysinfo_get_item_uspace(void *ptr, size_t size, 625 625 bool dry_run) 626 626 {
Note:
See TracChangeset
for help on using the changeset viewer.