Changeset d5a89a3 in mainline for kernel/generic/include
- 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/include
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/adt/list.h
re3272101 rd5a89a3 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
re3272101 rd5a89a3 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
re3272101 rd5a89a3 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
re3272101 rd5a89a3 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/lib/refcount.h
re3272101 rd5a89a3 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
re3272101 rd5a89a3 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/str.h
re3272101 rd5a89a3 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
re3272101 rd5a89a3 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
re3272101 rd5a89a3 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
re3272101 rd5a89a3 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.