Changeset bc73be3 in mainline for kernel/generic/include
- Timestamp:
- 2019-06-27T08:51:20Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8add15e0
- Parents:
- ad40b74b (diff), aeba767 (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/include
- Files:
-
- 15 edited
-
adt/hash_table.h (modified) (3 diffs)
-
adt/list.h (modified) (10 diffs)
-
adt/odict.h (modified) (1 diff)
-
bitops.h (modified) (2 diffs)
-
context.h (modified) (1 diff)
-
ddi/ddi.h (modified) (1 diff)
-
lib/elf_load.h (modified) (1 diff)
-
lib/refcount.h (modified) (1 diff)
-
macros.h (modified) (2 diffs)
-
mm/as.h (modified) (1 diff)
-
proc/program.h (modified) (1 diff)
-
str.h (modified) (5 diffs)
-
synch/spinlock.h (modified) (2 diffs)
-
trace.h (modified) (1 diff)
-
types/adt/odict.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/adt/hash_table.h
rad40b74b rbc73be3 53 53 54 54 /** Returns the hash of the key. */ 55 size_t (*key_hash)( void *key);55 size_t (*key_hash)(const void *key); 56 56 57 57 /** True if the items are equal (have the same lookup keys). */ … … 59 59 60 60 /** Returns true if the key is equal to the item's lookup key. */ 61 bool (*key_equal)( void *key, const ht_link_t *item);61 bool (*key_equal)(const void *key, const ht_link_t *item); 62 62 63 63 /** Hash table item removal callback. … … 94 94 extern void hash_table_insert(hash_table_t *, ht_link_t *); 95 95 extern bool hash_table_insert_unique(hash_table_t *, ht_link_t *); 96 extern ht_link_t *hash_table_find(const hash_table_t *, void *);96 extern ht_link_t *hash_table_find(const hash_table_t *, const void *); 97 97 extern ht_link_t *hash_table_find_next(const hash_table_t *, ht_link_t *, 98 98 ht_link_t *); 99 extern size_t hash_table_remove(hash_table_t *, void *);99 extern size_t hash_table_remove(hash_table_t *, const void *); 100 100 extern void hash_table_remove_item(hash_table_t *, ht_link_t *); 101 101 extern void hash_table_apply(hash_table_t *, bool (*)(ht_link_t *, void *), -
kernel/generic/include/adt/list.h
rad40b74b rbc73be3 150 150 * 151 151 */ 152 NO_TRACE static inline void link_initialize(link_t *link)152 _NO_TRACE static inline void link_initialize(link_t *link) 153 153 { 154 154 link->prev = NULL; … … 163 163 * 164 164 */ 165 NO_TRACE static inline void list_initialize(list_t *list)165 _NO_TRACE static inline void list_initialize(list_t *list) 166 166 { 167 167 list->head.prev = &list->head; … … 199 199 * 200 200 */ 201 NO_TRACE static inline void list_prepend(link_t *link, list_t *list)201 _NO_TRACE static inline void list_prepend(link_t *link, list_t *list) 202 202 { 203 203 list_insert_after(link, &list->head); … … 212 212 * 213 213 */ 214 NO_TRACE static inline void list_append(link_t *link, list_t *list)214 _NO_TRACE static inline void list_append(link_t *link, list_t *list) 215 215 { 216 216 list_insert_before(link, &list->head); … … 225 225 * 226 226 */ 227 NO_TRACE static inline void list_remove(link_t *link)227 _NO_TRACE static inline void list_remove(link_t *link) 228 228 { 229 229 if ((link->prev != NULL) && (link->next != NULL)) { … … 242 242 * 243 243 */ 244 NO_TRACE static inline bool list_empty(const list_t *list)244 _NO_TRACE static inline bool list_empty(const list_t *list) 245 245 { 246 246 return (list->head.next == &list->head); … … 310 310 * 311 311 */ 312 NO_TRACE static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)312 _NO_TRACE static inline void headless_list_split_or_concat(link_t *part1, link_t *part2) 313 313 { 314 314 part1->prev->next = part2; … … 331 331 * 332 332 */ 333 NO_TRACE static inline void headless_list_split(link_t *part1, link_t *part2)333 _NO_TRACE static inline void headless_list_split(link_t *part1, link_t *part2) 334 334 { 335 335 headless_list_split_or_concat(part1, part2); … … 346 346 * 347 347 */ 348 NO_TRACE static inline void headless_list_concat(link_t *part1, link_t *part2)348 _NO_TRACE static inline void headless_list_concat(link_t *part1, link_t *part2) 349 349 { 350 350 headless_list_split_or_concat(part1, part2); … … 361 361 * 362 362 */ 363 NO_TRACE static inline void list_concat(list_t *list1, list_t *list2)363 _NO_TRACE static inline void list_concat(list_t *list1, list_t *list2) 364 364 { 365 365 list_splice(list2, list1->head.prev); -
kernel/generic/include/adt/odict.h
rad40b74b rbc73be3 33 33 */ 34 34 35 #ifndef LIBC_ODICT_H_36 #define LIBC_ODICT_H_35 #ifndef _LIBC_ODICT_H_ 36 #define _LIBC_ODICT_H_ 37 37 38 38 #include <errno.h> -
kernel/generic/include/bitops.h
rad40b74b rbc73be3 52 52 * 53 53 */ 54 NO_TRACE static inline uint8_t fnzb32(uint32_t arg)54 _NO_TRACE static inline uint8_t fnzb32(uint32_t arg) 55 55 { 56 56 uint8_t n = 0; … … 87 87 * 88 88 */ 89 NO_TRACE static inline uint8_t fnzb64(uint64_t arg)89 _NO_TRACE static inline uint8_t fnzb64(uint64_t arg) 90 90 { 91 91 uint8_t n = 0; -
kernel/generic/include/context.h
rad40b74b rbc73be3 91 91 * 92 92 */ 93 NO_TRACE static inline void context_restore(context_t *ctx)93 _NO_TRACE static inline void context_restore(context_t *ctx) 94 94 { 95 95 context_restore_arch(ctx); -
kernel/generic/include/ddi/ddi.h
rad40b74b rbc73be3 60 60 extern void ddi_parea_register(parea_t *); 61 61 62 extern void *pio_map(void *, size_t); 63 extern void pio_unmap(void *, void *, size_t); 64 62 65 extern sys_errno_t sys_physmem_map(uintptr_t, size_t, unsigned int, void *, 63 66 uintptr_t); -
kernel/generic/include/lib/elf_load.h
rad40b74b rbc73be3 38 38 #include <abi/elf.h> 39 39 40 /** 41 * ELF error return codes 42 */ 43 #define EE_OK 0 /* No error */ 44 #define EE_INVALID 1 /* Invalid ELF image */ 45 #define EE_MEMORY 2 /* Cannot allocate address space */ 46 #define EE_INCOMPATIBLE 3 /* ELF image is not compatible with current architecture */ 47 #define EE_UNSUPPORTED 4 /* Non-supported ELF (e.g. dynamic ELFs) */ 48 #define EE_IRRECOVERABLE 5 /* Irrecoverable error. */ 49 50 extern unsigned int elf_load(elf_header_t *, as_t *); 51 extern const char *elf_error(unsigned int rc); 40 extern errno_t elf_load(elf_header_t *, as_t *); 52 41 53 42 #endif -
kernel/generic/include/lib/refcount.h
rad40b74b rbc73be3 37 37 */ 38 38 39 #ifndef LIBC_REFCOUNT_H_40 #define LIBC_REFCOUNT_H_39 #ifndef _LIBC_REFCOUNT_H_ 40 #define _LIBC_REFCOUNT_H_ 41 41 42 42 #include <assert.h> -
kernel/generic/include/macros.h
rad40b74b rbc73be3 49 49 * 50 50 */ 51 NO_TRACE static inline int overlaps(uint64_t s1, uint64_t sz1, uint64_t s2,51 _NO_TRACE static inline int overlaps(uint64_t s1, uint64_t sz1, uint64_t s2, 52 52 uint64_t sz2) 53 53 { … … 78 78 * 79 79 */ 80 NO_TRACE static inline int iswithin(uint64_t s1, uint64_t sz1, uint64_t s2,80 _NO_TRACE static inline int iswithin(uint64_t s1, uint64_t sz1, uint64_t s2, 81 81 uint64_t sz2) 82 82 { -
kernel/generic/include/mm/as.h
rad40b74b rbc73be3 59 59 #define KERNEL_ADDRESS_SPACE_SHADOWED KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 60 60 61 /** 62 * Defined to be true if user address space and kernel address space do not 63 * share the same page table. 64 */ 65 #define KERNEL_SEPARATE_PTL0 KERNEL_SEPARATE_PTL0_ARCH 66 61 67 #define KERNEL_ADDRESS_SPACE_START KERNEL_ADDRESS_SPACE_START_ARCH 62 68 #define KERNEL_ADDRESS_SPACE_END KERNEL_ADDRESS_SPACE_END_ARCH -
kernel/generic/include/proc/program.h
rad40b74b rbc73be3 50 50 struct task *task; /**< Program task */ 51 51 struct thread *main_thread; /**< Program main thread */ 52 unsigned int loader_status; /**< Binary loader error status */52 errno_t loader_status; /**< Binary loader error status */ 53 53 } program_t; 54 54 -
kernel/generic/include/str.h
rad40b74b rbc73be3 1 1 /* 2 2 * Copyright (c) 2001-2004 Jakub Jermar 3 * Copyright (c) 2005 Martin Decky 4 * Copyright (c) 2011 Oleg Romanenko 3 5 * All rights reserved. 4 6 * … … 36 38 #define KERN_STR_H_ 37 39 40 #include <errno.h> 38 41 #include <stdbool.h> 39 42 #include <stddef.h> 40 43 #include <stdint.h> 41 #include <errno.h>42 44 43 /* *<Common Unicode characters */45 /* Common Unicode characters */ 44 46 #define U_SPECIAL '?' 45 47 … … 61 63 #define U_CURSOR 0x2588 62 64 63 /** <No size limit constant */65 /** No size limit constant */ 64 66 #define STR_NO_LIMIT ((size_t) -1) 65 67 66 /** < Maximum size of a string containing cntcharacters */67 #define STR_BOUNDS( cnt) ((cnt) << 2)68 /** Maximum size of a string containing @c length characters */ 69 #define STR_BOUNDS(length) ((length) << 2) 68 70 69 71 extern wchar_t str_decode(const char *str, size_t *offset, size_t sz); … … 92 94 extern void wstr_to_str(char *dest, size_t size, const wchar_t *src); 93 95 94 extern char *str_dup(const char *src);95 extern char *str_ndup(const char *src, size_t n);96 97 96 extern char *str_chr(const char *str, wchar_t ch); 98 97 … … 100 99 extern bool wstr_remove(wchar_t *str, size_t pos); 101 100 102 extern errno_t str_uint64_t(const char *, char **, unsigned int, bool, uint64_t *); 101 extern char *str_dup(const char *src); 102 extern char *str_ndup(const char *src, size_t n); 103 104 extern errno_t str_uint64_t(const char *, char **, unsigned int, bool, 105 uint64_t *); 103 106 104 107 extern void order_suffix(const uint64_t, uint64_t *, char *); -
kernel/generic/include/synch/spinlock.h
rad40b74b rbc73be3 103 103 * @param lock Pointer to spinlock_t structure. 104 104 */ 105 NO_TRACE static inline void spinlock_lock(spinlock_t *lock)105 _NO_TRACE static inline void spinlock_lock(spinlock_t *lock) 106 106 { 107 107 preemption_disable(); … … 115 115 * @param lock Pointer to spinlock_t structure. 116 116 */ 117 NO_TRACE static inline void spinlock_unlock(spinlock_t *lock)117 _NO_TRACE static inline void spinlock_unlock(spinlock_t *lock) 118 118 { 119 119 atomic_flag_clear_explicit(&lock->flag, memory_order_release); -
kernel/generic/include/trace.h
rad40b74b rbc73be3 36 36 #define KERN_TRACE_H_ 37 37 38 #define NO_TRACE __attribute__((no_instrument_function))38 #define _NO_TRACE __attribute__((no_instrument_function)) 39 39 40 40 #endif -
kernel/generic/include/types/adt/odict.h
rad40b74b rbc73be3 33 33 */ 34 34 35 #ifndef LIBC_TYPES_ODICT_H_36 #define LIBC_TYPES_ODICT_H_35 #ifndef _LIBC_TYPES_ODICT_H_ 36 #define _LIBC_TYPES_ODICT_H_ 37 37 38 38 #include <adt/list.h>
Note:
See TracChangeset
for help on using the changeset viewer.
