Changeset d5a89a3 in mainline for kernel/generic/src
- Timestamp:
- 2019-02-11T22:31:04Z (6 years ago)
- Children:
- aaf9789c
- Parents:
- e3272101 (diff), 4805495 (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/console/kconsole.c
re3272101 rd5a89a3 156 156 157 157 /** Print count times a character */ 158 NO_TRACE static void print_cc(wchar_t ch, size_t count)158 _NO_TRACE static void print_cc(wchar_t ch, size_t count) 159 159 { 160 160 size_t i; … … 203 203 * 204 204 */ 205 NO_TRACE static int cmdtab_compl(char *input, size_t size, indev_t *indev,205 _NO_TRACE static int cmdtab_compl(char *input, size_t size, indev_t *indev, 206 206 hints_enum_func_t hints_enum) 207 207 { … … 290 290 } 291 291 292 NO_TRACE static cmd_info_t *parse_cmd(const wchar_t *cmdline)292 _NO_TRACE static cmd_info_t *parse_cmd(const wchar_t *cmdline) 293 293 { 294 294 size_t start = 0; … … 331 331 } 332 332 333 NO_TRACE static wchar_t *clever_readline(const char *prompt, indev_t *indev,333 _NO_TRACE static wchar_t *clever_readline(const char *prompt, indev_t *indev, 334 334 char *tmp) 335 335 { … … 548 548 } 549 549 550 NO_TRACE static bool parse_int_arg(const char *text, size_t len,550 _NO_TRACE static bool parse_int_arg(const char *text, size_t len, 551 551 sysarg_t *result) 552 552 { … … 637 637 * 638 638 */ 639 NO_TRACE static bool parse_argument(const char *cmdline, size_t size,639 _NO_TRACE static bool parse_argument(const char *cmdline, size_t size, 640 640 size_t *start, size_t *end) 641 641 { … … 674 674 * 675 675 */ 676 NO_TRACE static cmd_info_t *parse_cmdline(const char *cmdline, size_t size)676 _NO_TRACE static cmd_info_t *parse_cmdline(const char *cmdline, size_t size) 677 677 { 678 678 size_t start = 0; -
kernel/generic/src/ddi/ddi.c
re3272101 rd5a89a3 121 121 * 122 122 */ 123 NO_TRACE static errno_t physmem_map(uintptr_t phys, size_t pages,123 _NO_TRACE static errno_t physmem_map(uintptr_t phys, size_t pages, 124 124 unsigned int flags, uintptr_t *virt, uintptr_t bound) 125 125 { … … 227 227 } 228 228 229 NO_TRACE static errno_t physmem_unmap(uintptr_t virt)229 _NO_TRACE static errno_t physmem_unmap(uintptr_t virt) 230 230 { 231 231 assert(TASK); … … 312 312 * 313 313 */ 314 NO_TRACE static errno_t iospace_enable(task_id_t id, uintptr_t ioaddr, size_t size)314 _NO_TRACE static errno_t iospace_enable(task_id_t id, uintptr_t ioaddr, size_t size) 315 315 { 316 316 /* … … 353 353 * 354 354 */ 355 NO_TRACE static errno_t iospace_disable(task_id_t id, uintptr_t ioaddr, size_t size)355 _NO_TRACE static errno_t iospace_disable(task_id_t id, uintptr_t ioaddr, size_t size) 356 356 { 357 357 /* … … 413 413 } 414 414 415 NO_TRACE static errno_t dmamem_map(uintptr_t virt, size_t size, unsigned int map_flags,415 _NO_TRACE static errno_t dmamem_map(uintptr_t virt, size_t size, unsigned int map_flags, 416 416 unsigned int flags, uintptr_t *phys) 417 417 { … … 422 422 } 423 423 424 NO_TRACE static errno_t dmamem_map_anonymous(size_t size, uintptr_t constraint,424 _NO_TRACE static errno_t dmamem_map_anonymous(size_t size, uintptr_t constraint, 425 425 unsigned int map_flags, unsigned int flags, uintptr_t *phys, 426 426 uintptr_t *virt, uintptr_t bound) … … 451 451 } 452 452 453 NO_TRACE static errno_t dmamem_unmap(uintptr_t virt, size_t size)453 _NO_TRACE static errno_t dmamem_unmap(uintptr_t virt, size_t size) 454 454 { 455 455 // TODO: implement unlocking & unmap … … 457 457 } 458 458 459 NO_TRACE static errno_t dmamem_unmap_anonymous(uintptr_t virt)459 _NO_TRACE static errno_t dmamem_unmap_anonymous(uintptr_t virt) 460 460 { 461 461 return as_area_destroy(TASK->as, virt); -
kernel/generic/src/interrupt/interrupt.c
re3272101 rd5a89a3 99 99 * 100 100 */ 101 NO_TRACE void exc_dispatch(unsigned int n, istate_t *istate)101 _NO_TRACE void exc_dispatch(unsigned int n, istate_t *istate) 102 102 { 103 103 #if (IVT_ITEMS > 0) … … 159 159 * 160 160 */ 161 NO_TRACE static void exc_undef(unsigned int n, istate_t *istate)161 _NO_TRACE static void exc_undef(unsigned int n, istate_t *istate) 162 162 { 163 163 fault_if_from_uspace(istate, "Unhandled exception %u.", n); … … 165 165 } 166 166 167 static NO_TRACE void167 static _NO_TRACE void 168 168 fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args) 169 169 { … … 185 185 * 186 186 */ 187 NO_TRACE void fault_from_uspace(istate_t *istate, const char *fmt, ...)187 _NO_TRACE void fault_from_uspace(istate_t *istate, const char *fmt, ...) 188 188 { 189 189 va_list args; … … 197 197 * 198 198 */ 199 NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...)199 _NO_TRACE void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 200 200 { 201 201 if (!istate_from_uspace(istate)) … … 233 233 * 234 234 */ 235 NO_TRACE static int cmd_exc_print(cmd_arg_t *argv)235 _NO_TRACE static int cmd_exc_print(cmd_arg_t *argv) 236 236 { 237 237 bool excs_all; -
kernel/generic/src/lib/str.c
re3272101 rd5a89a3 1 1 /* 2 2 * Copyright (c) 2001-2004 Jakub Jermar 3 * Copyright (c) 2005 Martin Decky 4 * Copyright (c) 2008 Jiri Svoboda 5 * Copyright (c) 2011 Martin Sucha 6 * Copyright (c) 2011 Oleg Romanenko 3 7 * All rights reserved. 4 8 * … … 103 107 104 108 #include <str.h> 105 #include <cpu.h> 106 #include <arch/asm.h> 107 #include <arch.h> 109 110 #include <assert.h> 108 111 #include <errno.h> 112 #include <stdbool.h> 113 #include <stddef.h> 114 #include <stdint.h> 115 #include <stdlib.h> 116 109 117 #include <align.h> 110 #include <assert.h>111 118 #include <macros.h> 112 #include <stdlib.h>113 119 114 120 /** Check the condition if wchar_t is signed */ … … 616 622 } 617 623 624 /** Convert wide string to string. 625 * 626 * Convert wide string @a src to string. The output is written to the buffer 627 * specified by @a dest and @a size. @a size must be non-zero and the string 628 * written will always be well-formed. 629 * 630 * @param dest Destination buffer. 631 * @param size Size of the destination buffer. 632 * @param src Source wide string. 633 */ 634 void wstr_to_str(char *dest, size_t size, const wchar_t *src) 635 { 636 wchar_t ch; 637 size_t src_idx; 638 size_t dest_off; 639 640 /* There must be space for a null terminator in the buffer. */ 641 assert(size > 0); 642 643 src_idx = 0; 644 dest_off = 0; 645 646 while ((ch = src[src_idx++]) != 0) { 647 if (chr_encode(ch, dest, &dest_off, size - 1) != EOK) 648 break; 649 } 650 651 dest[dest_off] = '\0'; 652 } 653 654 /** Find first occurence of character in string. 655 * 656 * @param str String to search. 657 * @param ch Character to look for. 658 * 659 * @return Pointer to character in @a str or NULL if not found. 660 */ 661 char *str_chr(const char *str, wchar_t ch) 662 { 663 wchar_t acc; 664 size_t off = 0; 665 size_t last = 0; 666 667 while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) { 668 if (acc == ch) 669 return (char *) (str + last); 670 last = off; 671 } 672 673 return NULL; 674 } 675 676 /** Insert a wide character into a wide string. 677 * 678 * Insert a wide character into a wide string at position 679 * @a pos. The characters after the position are shifted. 680 * 681 * @param str String to insert to. 682 * @param ch Character to insert to. 683 * @param pos Character index where to insert. 684 * @param max_pos Characters in the buffer. 685 * 686 * @return True if the insertion was sucessful, false if the position 687 * is out of bounds. 688 * 689 */ 690 bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos) 691 { 692 size_t len = wstr_length(str); 693 694 if ((pos > len) || (pos + 1 > max_pos)) 695 return false; 696 697 size_t i; 698 for (i = len; i + 1 > pos; i--) 699 str[i + 1] = str[i]; 700 701 str[pos] = ch; 702 703 return true; 704 } 705 706 /** Remove a wide character from a wide string. 707 * 708 * Remove a wide character from a wide string at position 709 * @a pos. The characters after the position are shifted. 710 * 711 * @param str String to remove from. 712 * @param pos Character index to remove. 713 * 714 * @return True if the removal was sucessful, false if the position 715 * is out of bounds. 716 * 717 */ 718 bool wstr_remove(wchar_t *str, size_t pos) 719 { 720 size_t len = wstr_length(str); 721 722 if (pos >= len) 723 return false; 724 725 size_t i; 726 for (i = pos + 1; i <= len; i++) 727 str[i - 1] = str[i]; 728 729 return true; 730 } 731 618 732 /** Duplicate string. 619 733 * … … 675 789 str_ncpy(dest, size + 1, src, size); 676 790 return dest; 677 }678 679 /** Convert wide string to string.680 *681 * Convert wide string @a src to string. The output is written to the buffer682 * specified by @a dest and @a size. @a size must be non-zero and the string683 * written will always be well-formed.684 *685 * @param dest Destination buffer.686 * @param size Size of the destination buffer.687 * @param src Source wide string.688 */689 void wstr_to_str(char *dest, size_t size, const wchar_t *src)690 {691 wchar_t ch;692 size_t src_idx;693 size_t dest_off;694 695 /* There must be space for a null terminator in the buffer. */696 assert(size > 0);697 698 src_idx = 0;699 dest_off = 0;700 701 while ((ch = src[src_idx++]) != 0) {702 if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)703 break;704 }705 706 dest[dest_off] = '\0';707 }708 709 /** Find first occurence of character in string.710 *711 * @param str String to search.712 * @param ch Character to look for.713 *714 * @return Pointer to character in @a str or NULL if not found.715 *716 */717 char *str_chr(const char *str, wchar_t ch)718 {719 wchar_t acc;720 size_t off = 0;721 size_t last = 0;722 723 while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) {724 if (acc == ch)725 return (char *) (str + last);726 last = off;727 }728 729 return NULL;730 }731 732 /** Insert a wide character into a wide string.733 *734 * Insert a wide character into a wide string at position735 * @a pos. The characters after the position are shifted.736 *737 * @param str String to insert to.738 * @param ch Character to insert to.739 * @param pos Character index where to insert.740 * @param max_pos Characters in the buffer.741 *742 * @return True if the insertion was sucessful, false if the position743 * is out of bounds.744 *745 */746 bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos)747 {748 size_t len = wstr_length(str);749 750 if ((pos > len) || (pos + 1 > max_pos))751 return false;752 753 size_t i;754 for (i = len; i + 1 > pos; i--)755 str[i + 1] = str[i];756 757 str[pos] = ch;758 759 return true;760 }761 762 /** Remove a wide character from a wide string.763 *764 * Remove a wide character from a wide string at position765 * @a pos. The characters after the position are shifted.766 *767 * @param str String to remove from.768 * @param pos Character index to remove.769 *770 * @return True if the removal was sucessful, false if the position771 * is out of bounds.772 *773 */774 bool wstr_remove(wchar_t *str, size_t pos)775 {776 size_t len = wstr_length(str);777 778 if (pos >= len)779 return false;780 781 size_t i;782 for (i = pos + 1; i <= len; i++)783 str[i - 1] = str[i];784 785 return true;786 791 } 787 792 -
kernel/generic/src/main/main.c
re3272101 rd5a89a3 160 160 * 161 161 */ 162 NO_TRACE void main_bsp(void)162 _NO_TRACE void main_bsp(void) 163 163 { 164 164 config.cpu_count = 1; -
kernel/generic/src/mm/as.c
re3272101 rd5a89a3 127 127 static void used_space_shorten_ival(used_space_ival_t *, size_t); 128 128 129 NO_TRACE static errno_t as_constructor(void *obj, unsigned int flags)129 _NO_TRACE static errno_t as_constructor(void *obj, unsigned int flags) 130 130 { 131 131 as_t *as = (as_t *) obj; … … 137 137 } 138 138 139 NO_TRACE static size_t as_destructor(void *obj)139 _NO_TRACE static size_t as_destructor(void *obj) 140 140 { 141 141 return as_destructor_arch((as_t *) obj); … … 281 281 * 282 282 */ 283 NO_TRACE void as_hold(as_t *as)283 _NO_TRACE void as_hold(as_t *as) 284 284 { 285 285 refcount_up(&as->refcount); … … 294 294 * 295 295 */ 296 NO_TRACE void as_release(as_t *as)296 _NO_TRACE void as_release(as_t *as) 297 297 { 298 298 if (refcount_down(&as->refcount)) … … 340 340 * @return True if the two areas conflict, false otherwise. 341 341 */ 342 NO_TRACE static bool area_is_conflicting(uintptr_t addr,342 _NO_TRACE static bool area_is_conflicting(uintptr_t addr, 343 343 size_t count, bool guarded, as_area_t *area) 344 344 { … … 380 380 * 381 381 */ 382 NO_TRACE static bool check_area_conflicts(as_t *as, uintptr_t addr,382 _NO_TRACE static bool check_area_conflicts(as_t *as, uintptr_t addr, 383 383 size_t count, bool guarded, as_area_t *avoid) 384 384 { … … 474 474 * 475 475 */ 476 NO_TRACE static uintptr_t as_get_unmapped_area(as_t *as, uintptr_t bound,476 _NO_TRACE static uintptr_t as_get_unmapped_area(as_t *as, uintptr_t bound, 477 477 size_t size, bool guarded) 478 478 { … … 580 580 * @param pagemap Pagemap 581 581 */ 582 NO_TRACE void as_pagemap_initialize(as_pagemap_t *pagemap)582 _NO_TRACE void as_pagemap_initialize(as_pagemap_t *pagemap) 583 583 { 584 584 odict_initialize(&pagemap->map, as_pagemap_getkey, as_pagemap_cmp); … … 591 591 * @param pagemap Pagemap 592 592 */ 593 NO_TRACE void as_pagemap_finalize(as_pagemap_t *pagemap)593 _NO_TRACE void as_pagemap_finalize(as_pagemap_t *pagemap) 594 594 { 595 595 as_page_mapping_t *mapping = as_pagemap_first(pagemap); … … 606 606 * @return First mapping or @c NULL if there is none 607 607 */ 608 NO_TRACE as_page_mapping_t *as_pagemap_first(as_pagemap_t *pagemap)608 _NO_TRACE as_page_mapping_t *as_pagemap_first(as_pagemap_t *pagemap) 609 609 { 610 610 odlink_t *odlink; … … 622 622 * @return Next mapping or @c NULL if @a cur is the last one 623 623 */ 624 NO_TRACE as_page_mapping_t *as_pagemap_next(as_page_mapping_t *cur)624 _NO_TRACE as_page_mapping_t *as_pagemap_next(as_page_mapping_t *cur) 625 625 { 626 626 odlink_t *odlink; … … 640 640 * @return EOK on succcess or ENOENT if no mapping found 641 641 */ 642 NO_TRACE errno_t as_pagemap_find(as_pagemap_t *pagemap, uintptr_t vaddr,642 _NO_TRACE errno_t as_pagemap_find(as_pagemap_t *pagemap, uintptr_t vaddr, 643 643 uintptr_t *rframe) 644 644 { … … 663 663 * @param frame Physical frame address 664 664 */ 665 NO_TRACE void as_pagemap_insert(as_pagemap_t *pagemap, uintptr_t vaddr,665 _NO_TRACE void as_pagemap_insert(as_pagemap_t *pagemap, uintptr_t vaddr, 666 666 uintptr_t frame) 667 667 { … … 680 680 * @param mapping Mapping 681 681 */ 682 NO_TRACE void as_pagemap_remove(as_page_mapping_t *mapping)682 _NO_TRACE void as_pagemap_remove(as_page_mapping_t *mapping) 683 683 { 684 684 odict_remove(&mapping->lpagemap); … … 693 693 * 694 694 */ 695 NO_TRACE static void sh_info_remove_reference(share_info_t *sh_info)695 _NO_TRACE static void sh_info_remove_reference(share_info_t *sh_info) 696 696 { 697 697 bool dealloc = false; … … 861 861 * 862 862 */ 863 NO_TRACE static as_area_t *find_area_and_lock(as_t *as, uintptr_t va)863 _NO_TRACE static as_area_t *find_area_and_lock(as_t *as, uintptr_t va) 864 864 { 865 865 assert(mutex_locked(&as->lock)); … … 1305 1305 * 1306 1306 */ 1307 NO_TRACE bool as_area_check_access(as_area_t *area, pf_access_t access)1307 _NO_TRACE bool as_area_check_access(as_area_t *area, pf_access_t access) 1308 1308 { 1309 1309 assert(mutex_locked(&area->lock)); … … 1328 1328 * 1329 1329 */ 1330 NO_TRACE static unsigned int area_flags_to_page_flags(unsigned int aflags)1330 _NO_TRACE static unsigned int area_flags_to_page_flags(unsigned int aflags) 1331 1331 { 1332 1332 unsigned int flags = PAGE_USER | PAGE_PRESENT; … … 1698 1698 * 1699 1699 */ 1700 NO_TRACE unsigned int as_area_get_flags(as_area_t *area)1700 _NO_TRACE unsigned int as_area_get_flags(as_area_t *area) 1701 1701 { 1702 1702 assert(mutex_locked(&area->lock)); … … 1746 1746 * 1747 1747 */ 1748 NO_TRACE pte_t *page_table_create(unsigned int flags)1748 _NO_TRACE pte_t *page_table_create(unsigned int flags) 1749 1749 { 1750 1750 assert(as_operations); … … 1761 1761 * 1762 1762 */ 1763 NO_TRACE void page_table_destroy(pte_t *page_table)1763 _NO_TRACE void page_table_destroy(pte_t *page_table) 1764 1764 { 1765 1765 assert(as_operations); … … 1782 1782 * 1783 1783 */ 1784 NO_TRACE void page_table_lock(as_t *as, bool lock)1784 _NO_TRACE void page_table_lock(as_t *as, bool lock) 1785 1785 { 1786 1786 assert(as_operations); … … 1796 1796 * 1797 1797 */ 1798 NO_TRACE void page_table_unlock(as_t *as, bool unlock)1798 _NO_TRACE void page_table_unlock(as_t *as, bool unlock) 1799 1799 { 1800 1800 assert(as_operations); … … 1811 1811 * are locked, otherwise false. 1812 1812 */ 1813 NO_TRACE bool page_table_locked(as_t *as)1813 _NO_TRACE bool page_table_locked(as_t *as) 1814 1814 { 1815 1815 assert(as_operations); -
kernel/generic/src/mm/frame.c
re3272101 rd5a89a3 79 79 * 80 80 */ 81 NO_TRACE static void frame_initialize(frame_t *frame)81 _NO_TRACE static void frame_initialize(frame_t *frame) 82 82 { 83 83 frame->refcount = 0; … … 100 100 * 101 101 */ 102 NO_TRACE static size_t zones_insert_zone(pfn_t base, size_t count,102 _NO_TRACE static size_t zones_insert_zone(pfn_t base, size_t count, 103 103 zone_flags_t flags) 104 104 { … … 156 156 * 157 157 */ 158 NO_TRACE static size_t frame_total_free_get_internal(void)158 _NO_TRACE static size_t frame_total_free_get_internal(void) 159 159 { 160 160 size_t total = 0; … … 167 167 } 168 168 169 NO_TRACE size_t frame_total_free_get(void)169 _NO_TRACE size_t frame_total_free_get(void) 170 170 { 171 171 size_t total; … … 190 190 * 191 191 */ 192 NO_TRACE size_t find_zone(pfn_t frame, size_t count, size_t hint)192 _NO_TRACE size_t find_zone(pfn_t frame, size_t count, size_t hint) 193 193 { 194 194 if (hint >= zones.count) … … 211 211 212 212 /** @return True if zone can allocate specified number of frames */ 213 NO_TRACE static bool zone_can_alloc(zone_t *zone, size_t count,213 _NO_TRACE static bool zone_can_alloc(zone_t *zone, size_t count, 214 214 pfn_t constraint) 215 215 { … … 239 239 * 240 240 */ 241 NO_TRACE static size_t find_free_zone_all(size_t count, zone_flags_t flags,241 _NO_TRACE static size_t find_free_zone_all(size_t count, zone_flags_t flags, 242 242 pfn_t constraint, size_t hint) 243 243 { … … 265 265 * 266 266 */ 267 NO_TRACE static bool is_high_priority(pfn_t base, size_t count)267 _NO_TRACE static bool is_high_priority(pfn_t base, size_t count) 268 268 { 269 269 return (base + count <= FRAME_LOWPRIO); … … 285 285 * 286 286 */ 287 NO_TRACE static size_t find_free_zone_lowprio(size_t count, zone_flags_t flags,287 _NO_TRACE static size_t find_free_zone_lowprio(size_t count, zone_flags_t flags, 288 288 pfn_t constraint, size_t hint) 289 289 { … … 322 322 * 323 323 */ 324 NO_TRACE static size_t find_free_zone(size_t count, zone_flags_t flags,324 _NO_TRACE static size_t find_free_zone(size_t count, zone_flags_t flags, 325 325 pfn_t constraint, size_t hint) 326 326 { … … 346 346 347 347 /** Return frame from zone. */ 348 NO_TRACE static frame_t *zone_get_frame(zone_t *zone, size_t index)348 _NO_TRACE static frame_t *zone_get_frame(zone_t *zone, size_t index) 349 349 { 350 350 assert(index < zone->count); … … 366 366 * 367 367 */ 368 NO_TRACE static size_t zone_frame_alloc(zone_t *zone, size_t count,368 _NO_TRACE static size_t zone_frame_alloc(zone_t *zone, size_t count, 369 369 pfn_t constraint) 370 370 { … … 405 405 * 406 406 */ 407 NO_TRACE static size_t zone_frame_free(zone_t *zone, size_t index)407 _NO_TRACE static size_t zone_frame_free(zone_t *zone, size_t index) 408 408 { 409 409 assert(zone->flags & ZONE_AVAILABLE); … … 427 427 428 428 /** Mark frame in zone unavailable to allocation. */ 429 NO_TRACE static void zone_mark_unavailable(zone_t *zone, size_t index)429 _NO_TRACE static void zone_mark_unavailable(zone_t *zone, size_t index) 430 430 { 431 431 assert(zone->flags & ZONE_AVAILABLE); … … 453 453 * 454 454 */ 455 NO_TRACE static void zone_merge_internal(size_t z1, size_t z2, zone_t *old_z1,455 _NO_TRACE static void zone_merge_internal(size_t z1, size_t z2, zone_t *old_z1, 456 456 void *confdata) 457 457 { … … 507 507 * 508 508 */ 509 NO_TRACE static void return_config_frames(size_t znum, pfn_t pfn, size_t count)509 _NO_TRACE static void return_config_frames(size_t znum, pfn_t pfn, size_t count) 510 510 { 511 511 assert(zones.info[znum].flags & ZONE_AVAILABLE); … … 623 623 * 624 624 */ 625 NO_TRACE static void zone_construct(zone_t *zone, pfn_t start, size_t count,625 _NO_TRACE static void zone_construct(zone_t *zone, pfn_t start, size_t count, 626 626 zone_flags_t flags, void *confdata) 627 627 { … … 1037 1037 * 1038 1038 */ 1039 NO_TRACE void frame_reference_add(pfn_t pfn)1039 _NO_TRACE void frame_reference_add(pfn_t pfn) 1040 1040 { 1041 1041 irq_spinlock_lock(&zones.lock, true); … … 1056 1056 * 1057 1057 */ 1058 NO_TRACE void frame_mark_unavailable(pfn_t start, size_t count)1058 _NO_TRACE void frame_mark_unavailable(pfn_t start, size_t count) 1059 1059 { 1060 1060 irq_spinlock_lock(&zones.lock, true); -
kernel/generic/src/mm/page.c
re3272101 rd5a89a3 95 95 * 96 96 */ 97 NO_TRACE void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame,97 _NO_TRACE void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame, 98 98 unsigned int flags) 99 99 { … … 120 120 * 121 121 */ 122 NO_TRACE void page_mapping_remove(as_t *as, uintptr_t page)122 _NO_TRACE void page_mapping_remove(as_t *as, uintptr_t page) 123 123 { 124 124 assert(page_table_locked(as)); … … 144 144 * the PTE is not guaranteed to be present. 145 145 */ 146 NO_TRACE bool page_mapping_find(as_t *as, uintptr_t page, bool nolock,146 _NO_TRACE bool page_mapping_find(as_t *as, uintptr_t page, bool nolock, 147 147 pte_t *pte) 148 148 { … … 165 165 * @param pte New PTE. 166 166 */ 167 NO_TRACE void page_mapping_update(as_t *as, uintptr_t page, bool nolock,167 _NO_TRACE void page_mapping_update(as_t *as, uintptr_t page, bool nolock, 168 168 pte_t *pte) 169 169 { -
kernel/generic/src/mm/slab.c
re3272101 rd5a89a3 158 158 * 159 159 */ 160 NO_TRACE static slab_t *slab_space_alloc(slab_cache_t *cache,160 _NO_TRACE static slab_t *slab_space_alloc(slab_cache_t *cache, 161 161 unsigned int flags) 162 162 { … … 206 206 * 207 207 */ 208 NO_TRACE static size_t slab_space_free(slab_cache_t *cache, slab_t *slab)208 _NO_TRACE static size_t slab_space_free(slab_cache_t *cache, slab_t *slab) 209 209 { 210 210 frame_free(KA2PA(slab->start), slab->cache->frames); … … 218 218 219 219 /** Map object to slab structure */ 220 NO_TRACE static slab_t *obj2slab(void *obj)220 _NO_TRACE static slab_t *obj2slab(void *obj) 221 221 { 222 222 return (slab_t *) frame_get_parent(ADDR2PFN(KA2PA(obj)), 0); … … 234 234 * 235 235 */ 236 NO_TRACE static size_t slab_obj_destroy(slab_cache_t *cache, void *obj,236 _NO_TRACE static size_t slab_obj_destroy(slab_cache_t *cache, void *obj, 237 237 slab_t *slab) 238 238 { … … 276 276 * 277 277 */ 278 NO_TRACE static void *slab_obj_create(slab_cache_t *cache, unsigned int flags)278 _NO_TRACE static void *slab_obj_create(slab_cache_t *cache, unsigned int flags) 279 279 { 280 280 irq_spinlock_lock(&cache->slablock, true); … … 332 332 * 333 333 */ 334 NO_TRACE static slab_magazine_t *get_mag_from_cache(slab_cache_t *cache,334 _NO_TRACE static slab_magazine_t *get_mag_from_cache(slab_cache_t *cache, 335 335 bool first) 336 336 { … … 357 357 * 358 358 */ 359 NO_TRACE static void put_mag_to_cache(slab_cache_t *cache,359 _NO_TRACE static void put_mag_to_cache(slab_cache_t *cache, 360 360 slab_magazine_t *mag) 361 361 { … … 373 373 * 374 374 */ 375 NO_TRACE static size_t magazine_destroy(slab_cache_t *cache,375 _NO_TRACE static size_t magazine_destroy(slab_cache_t *cache, 376 376 slab_magazine_t *mag) 377 377 { … … 392 392 * 393 393 */ 394 NO_TRACE static slab_magazine_t *get_full_current_mag(slab_cache_t *cache)394 _NO_TRACE static slab_magazine_t *get_full_current_mag(slab_cache_t *cache) 395 395 { 396 396 slab_magazine_t *cmag = cache->mag_cache[CPU->id].current; … … 429 429 * 430 430 */ 431 NO_TRACE static void *magazine_obj_get(slab_cache_t *cache)431 _NO_TRACE static void *magazine_obj_get(slab_cache_t *cache) 432 432 { 433 433 if (!CPU) … … 459 459 * 460 460 */ 461 NO_TRACE static slab_magazine_t *make_empty_current_mag(slab_cache_t *cache)461 _NO_TRACE static slab_magazine_t *make_empty_current_mag(slab_cache_t *cache) 462 462 { 463 463 slab_magazine_t *cmag = cache->mag_cache[CPU->id].current; … … 509 509 * 510 510 */ 511 NO_TRACE static int magazine_obj_put(slab_cache_t *cache, void *obj)511 _NO_TRACE static int magazine_obj_put(slab_cache_t *cache, void *obj) 512 512 { 513 513 if (!CPU) … … 538 538 * 539 539 */ 540 NO_TRACE static size_t comp_objects(slab_cache_t *cache)540 _NO_TRACE static size_t comp_objects(slab_cache_t *cache) 541 541 { 542 542 if (cache->flags & SLAB_CACHE_SLINSIDE) … … 550 550 * 551 551 */ 552 NO_TRACE static size_t badness(slab_cache_t *cache)552 _NO_TRACE static size_t badness(slab_cache_t *cache) 553 553 { 554 554 size_t objects = comp_objects(cache); … … 564 564 * 565 565 */ 566 NO_TRACE static bool make_magcache(slab_cache_t *cache)566 _NO_TRACE static bool make_magcache(slab_cache_t *cache) 567 567 { 568 568 assert(_slab_initialized >= 2); … … 585 585 * 586 586 */ 587 NO_TRACE static void _slab_cache_create(slab_cache_t *cache, const char *name,587 _NO_TRACE static void _slab_cache_create(slab_cache_t *cache, const char *name, 588 588 size_t size, size_t align, errno_t (*constructor)(void *obj, 589 589 unsigned int kmflag), size_t (*destructor)(void *obj), unsigned int flags) … … 660 660 * 661 661 */ 662 NO_TRACE static size_t _slab_reclaim(slab_cache_t *cache, unsigned int flags)662 _NO_TRACE static size_t _slab_reclaim(slab_cache_t *cache, unsigned int flags) 663 663 { 664 664 if (cache->flags & SLAB_CACHE_NOMAGAZINE) … … 707 707 * 708 708 */ 709 NO_TRACE static void _slab_free(slab_cache_t *cache, void *obj, slab_t *slab)709 _NO_TRACE static void _slab_free(slab_cache_t *cache, void *obj, slab_t *slab) 710 710 { 711 711 if (!obj) -
kernel/generic/src/proc/current.c
re3272101 rd5a89a3 70 70 * 71 71 */ 72 NO_TRACE void current_copy(current_t *src, current_t *dst)72 _NO_TRACE void current_copy(current_t *src, current_t *dst) 73 73 { 74 74 assert(src->magic == MAGIC); -
kernel/generic/src/sysinfo/sysinfo.c
re3272101 rd5a89a3 62 62 * 63 63 */ 64 NO_TRACE static errno_t sysinfo_item_constructor(void *obj, unsigned int kmflag)64 _NO_TRACE static errno_t sysinfo_item_constructor(void *obj, unsigned int kmflag) 65 65 { 66 66 sysinfo_item_t *item = (sysinfo_item_t *) obj; … … 82 82 * 83 83 */ 84 NO_TRACE static size_t sysinfo_item_destructor(void *obj)84 _NO_TRACE static size_t sysinfo_item_destructor(void *obj) 85 85 { 86 86 sysinfo_item_t *item = (sysinfo_item_t *) obj; … … 124 124 * 125 125 */ 126 NO_TRACE static sysinfo_item_t *sysinfo_find_item(const char *name,126 _NO_TRACE static sysinfo_item_t *sysinfo_find_item(const char *name, 127 127 sysinfo_item_t *subtree, sysinfo_return_t **ret, bool dry_run) 128 128 { … … 190 190 * 191 191 */ 192 NO_TRACE static sysinfo_item_t *sysinfo_create_path(const char *name,192 _NO_TRACE static sysinfo_item_t *sysinfo_create_path(const char *name, 193 193 sysinfo_item_t **psubtree) 194 194 { … … 508 508 * 509 509 */ 510 NO_TRACE static void sysinfo_indent(size_t spaces)510 _NO_TRACE static void sysinfo_indent(size_t spaces) 511 511 { 512 512 for (size_t i = 0; i < spaces; i++) … … 522 522 * 523 523 */ 524 NO_TRACE static void sysinfo_dump_internal(sysinfo_item_t *root, size_t spaces)524 _NO_TRACE static void sysinfo_dump_internal(sysinfo_item_t *root, size_t spaces) 525 525 { 526 526 /* Walk all siblings */ … … 622 622 * 623 623 */ 624 NO_TRACE static sysinfo_return_t sysinfo_get_item(const char *name,624 _NO_TRACE static sysinfo_return_t sysinfo_get_item(const char *name, 625 625 sysinfo_item_t **root, bool dry_run) 626 626 { … … 677 677 * 678 678 */ 679 NO_TRACE static sysinfo_return_t sysinfo_get_item_uspace(void *ptr, size_t size,679 _NO_TRACE static sysinfo_return_t sysinfo_get_item_uspace(void *ptr, size_t size, 680 680 bool dry_run) 681 681 { … … 720 720 * 721 721 */ 722 NO_TRACE static sysinfo_return_t sysinfo_get_keys(const char *name,722 _NO_TRACE static sysinfo_return_t sysinfo_get_keys(const char *name, 723 723 sysinfo_item_t **root, bool dry_run) 724 724 { … … 786 786 * 787 787 */ 788 NO_TRACE static sysinfo_return_t sysinfo_get_keys_uspace(void *ptr, size_t size,788 _NO_TRACE static sysinfo_return_t sysinfo_get_keys_uspace(void *ptr, size_t size, 789 789 bool dry_run) 790 790 {
Note:
See TracChangeset
for help on using the changeset viewer.