Changeset c47e1a8 in mainline for kernel/generic/include
- Timestamp:
- 2010-05-21T07:50:04Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d51ee2b
- Parents:
- cf8cc36 (diff), 15b592b (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:
-
- 2 added
- 64 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/adt/avl.h
rcf8cc36 rc47e1a8 36 36 #define KERN_AVLTREE_H_ 37 37 38 #include <arch/types.h>39 38 #include <typedefs.h> 40 39 -
kernel/generic/include/adt/bitmap.h
rcf8cc36 rc47e1a8 36 36 #define KERN_BITMAP_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 #define BITS2BYTES(bits) (bits ? ((((bits)-1)>>3)+1) : 0) -
kernel/generic/include/adt/btree.h
rcf8cc36 rc47e1a8 36 36 #define KERN_BTREE_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <adt/list.h> 40 40 -
kernel/generic/include/adt/hash_table.h
rcf8cc36 rc47e1a8 37 37 38 38 #include <adt/list.h> 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 41 41 /** Set of operations for hash table. */ -
kernel/generic/include/adt/list.h
rcf8cc36 rc47e1a8 36 36 #define KERN_LIST_H_ 37 37 38 #include <arch/types.h>39 38 #include <typedefs.h> 40 39 -
kernel/generic/include/arch.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 41 41 #include <mm/as.h> 42 42 43 #define DEFAULT_CONTEXT 43 #define DEFAULT_CONTEXT 0 44 44 45 #define CPU 46 #define THREAD 47 #define TASK 48 #define AS 49 #define CONTEXT 50 #define PREEMPTION_DISABLED 45 #define CPU THE->cpu 46 #define THREAD THE->thread 47 #define TASK THE->task 48 #define AS THE->as 49 #define CONTEXT (THE->task ? THE->task->context : DEFAULT_CONTEXT) 50 #define PREEMPTION_DISABLED THE->preemption_disabled 51 51 52 #define context_check(ctx1, ctx2) 52 #define context_check(ctx1, ctx2) ((ctx1) == (ctx2)) 53 53 54 54 /** … … 58 58 */ 59 59 typedef struct { 60 size_t preemption_disabled; 61 thread_t *thread; 62 task_t *task; 63 cpu_t *cpu; 64 as_t *as; 60 size_t preemption_disabled; /**< Preemption disabled counter. */ 61 thread_t *thread; /**< Current thread. */ 62 task_t *task; /**< Current task. */ 63 cpu_t *cpu; /**< Executing cpu. */ 64 as_t *as; /**< Current address space. */ 65 65 } the_t; 66 66 67 67 #define THE ((the_t * )(get_stack_base())) 68 68 69 extern void the_initialize(the_t * the);70 extern void the_copy(the_t * src, the_t *dst);69 extern void the_initialize(the_t *); 70 extern void the_copy(the_t *, the_t *); 71 71 72 72 extern void arch_pre_mm_init(void); … … 80 80 extern void reboot(void); 81 81 extern void arch_reboot(void); 82 extern void *arch_construct_function(fncptr_t * fptr, void *addr, void *caller);82 extern void *arch_construct_function(fncptr_t *, void *, void *); 83 83 84 84 #endif -
kernel/generic/include/atomic.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ATOMIC_H_ 37 37 38 typedef struct atomic { 39 volatile long count; 40 } atomic_t; 41 38 #include <typedefs.h> 42 39 #include <arch/atomic.h> 43 40 44 static inline void atomic_set(atomic_t *val, longi)41 static inline void atomic_set(atomic_t *val, atomic_count_t i) 45 42 { 46 43 val->count = i; 47 44 } 48 45 49 static inline longatomic_get(atomic_t *val)46 static inline atomic_count_t atomic_get(atomic_t *val) 50 47 { 51 48 return val->count; -
kernel/generic/include/bitops.h
rcf8cc36 rc47e1a8 65 65 } 66 66 67 if (arg >> 1) { 68 arg >>= 1; 67 if (arg >> 1) 69 68 n += 1; 70 }71 69 72 70 return n; -
kernel/generic/include/byteorder.h
rcf8cc36 rc47e1a8 36 36 #define KERN_BYTEORDER_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 #if !(defined(__BE__) ^ defined(__LE__)) -
kernel/generic/include/config.h
rcf8cc36 rc47e1a8 36 36 #define KERN_CONFIG_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <arch/mm/page.h> 40 40 -
kernel/generic/include/console/chardev.h
rcf8cc36 rc47e1a8 37 37 38 38 #include <adt/list.h> 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 #include <synch/waitq.h> 41 41 #include <synch/spinlock.h> … … 53 53 /** Character input device. */ 54 54 typedef struct indev { 55 c har *name;55 const char *name; 56 56 waitq_t wq; 57 57 … … 81 81 /** Character output device. */ 82 82 typedef struct outdev { 83 c har *name;83 const char *name; 84 84 85 85 /** Protects everything below. */ … … 95 95 } outdev_t; 96 96 97 extern void indev_initialize(c har *name, indev_t *indev,97 extern void indev_initialize(const char *name, indev_t *indev, 98 98 indev_operations_t *op); 99 99 extern void indev_push_character(indev_t *indev, wchar_t ch); 100 100 extern wchar_t indev_pop_character(indev_t *indev); 101 101 102 extern void outdev_initialize(c har *name, outdev_t *outdev,102 extern void outdev_initialize(const char *name, outdev_t *outdev, 103 103 outdev_operations_t *op); 104 104 -
kernel/generic/include/console/console.h
rcf8cc36 rc47e1a8 36 36 #define KERN_CONSOLE_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <console/chardev.h> 40 40 41 41 extern indev_t *stdin; 42 42 extern outdev_t *stdout; 43 extern bool silent;44 43 45 44 extern indev_t *stdin_wire(void); -
kernel/generic/include/console/kconsole.h
rcf8cc36 rc47e1a8 94 94 extern void kconsole_notify_init(void); 95 95 extern bool kconsole_check_poll(void); 96 extern void kconsole(c har *prompt,char *msg, bool kcon);96 extern void kconsole(const char *prompt, const char *msg, bool kcon); 97 97 extern void kconsole_thread(void *data); 98 98 -
kernel/generic/include/context.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_CONTEXT_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <arch/context.h> 40 40 41 #define context_set_generic(ctx, _pc, stack, size) \ 42 (ctx)->pc = (uintptr_t) (_pc); \ 43 (ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; 41 44 42 #ifndef context_set 43 #define context_set(c, _pc, stack, size) \ 44 (c)->pc = (uintptr_t) (_pc); \ 45 (c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; 46 #endif /* context_set */ 47 48 extern int context_save_arch(context_t *c) __attribute__ ((returns_twice)); 49 extern void context_restore_arch(context_t *c) __attribute__ ((noreturn)); 45 extern int context_save_arch(context_t *ctx) __attribute__((returns_twice)); 46 extern void context_restore_arch(context_t *ctx) __attribute__((noreturn)); 50 47 51 48 /** Save register context. … … 73 70 * saved like that would therefore lead to a disaster. 74 71 * 75 * @param c 72 * @param ctx Context structure. 76 73 * 77 * @return context_save() returns 1, context_restore() returns 0. 74 * @return context_save() returns 1, context_restore() returns 0. 75 * 78 76 */ 79 #define context_save(c ) context_save_arch(c)77 #define context_save(ctx) context_save_arch(ctx) 80 78 81 79 /** Restore register context. … … 88 86 * being return value. 89 87 * 90 * @param c 88 * @param ctx Context structure. 91 89 */ 92 static inline void context_restore(context_t *c )90 static inline void context_restore(context_t *ctx) 93 91 { 94 context_restore_arch(c );92 context_restore_arch(ctx); 95 93 } 96 94 -
kernel/generic/include/cpu.h
rcf8cc36 rc47e1a8 48 48 * There is one structure like this for every processor. 49 49 */ 50 typedef struct {50 typedef struct cpu { 51 51 SPINLOCK_DECLARE(lock); 52 52 … … 68 68 are disabled. */ 69 69 70 bool idle; 71 uint64_t idle_ticks; 72 uint64_t busy_ticks; 73 70 74 /** 71 75 * Processor ID assigned by kernel. … … 73 77 unsigned int id; 74 78 75 intactive;79 bool active; 76 80 int tlb_active; 77 81 -
kernel/generic/include/ddi/ddi.h
rcf8cc36 rc47e1a8 37 37 38 38 #include <ddi/ddi_arg.h> 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 #include <proc/task.h> 41 41 #include <adt/list.h> -
kernel/generic/include/ddi/device.h
rcf8cc36 rc47e1a8 36 36 #define KERN_DEVICE_H_ 37 37 38 #include <arch/types.h>39 38 #include <typedefs.h> 40 39 -
kernel/generic/include/ddi/irq.h
rcf8cc36 rc47e1a8 81 81 #ifdef KERNEL 82 82 83 #include < arch/types.h>83 #include <typedefs.h> 84 84 #include <adt/list.h> 85 85 #include <adt/hash_table.h> -
kernel/generic/include/func.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_FUNC_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <atomic.h> 40 40 … … 42 42 43 43 extern void halt(void) __attribute__((noreturn)); 44 extern unative_t atoi(const char *text);45 extern void order(const uint64_t val, uint64_t *rv, char *suffix);46 44 47 45 #endif -
kernel/generic/include/interrupt.h
rcf8cc36 rc47e1a8 37 37 38 38 #include <arch/interrupt.h> 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 #include <proc/task.h> 41 41 #include <proc/thread.h> … … 46 46 typedef void (* iroutine)(int n, istate_t *istate); 47 47 48 extern void fault_if_from_uspace(istate_t *istate, c har *fmt, ...);48 extern void fault_if_from_uspace(istate_t *istate, const char *fmt, ...); 49 49 extern iroutine exc_register(int n, const char *name, iroutine f); 50 50 extern void exc_dispatch(int n, istate_t *t); -
kernel/generic/include/ipc/event.h
rcf8cc36 rc47e1a8 37 37 38 38 #include <ipc/event_types.h> 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 #include <synch/spinlock.h> 41 41 #include <ipc/ipc.h> -
kernel/generic/include/ipc/ipc.h
rcf8cc36 rc47e1a8 227 227 #ifdef KERNEL 228 228 229 #define IPC_MAX_PHONES 16229 #define IPC_MAX_PHONES 32 230 230 231 231 #include <synch/spinlock.h> -
kernel/generic/include/ipc/irq.h
rcf8cc36 rc47e1a8 41 41 #include <ipc/ipc.h> 42 42 #include <ddi/irq.h> 43 #include < arch/types.h>43 #include <typedefs.h> 44 44 #include <adt/list.h> 45 45 -
kernel/generic/include/ipc/sysipc.h
rcf8cc36 rc47e1a8 38 38 #include <ipc/ipc.h> 39 39 #include <ipc/irq.h> 40 #include < arch/types.h>40 #include <typedefs.h> 41 41 42 42 unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, … … 57 57 unative_t sys_ipc_forward_slow(unative_t callid, unative_t phoneid, 58 58 ipc_data_t *data, int mode); 59 unative_t sys_ipc_hangup( int phoneid);59 unative_t sys_ipc_hangup(unative_t phoneid); 60 60 unative_t sys_ipc_register_irq(inr_t inr, devno_t devno, unative_t method, 61 61 irq_code_t *ucode); -
kernel/generic/include/lib/elf.h
rcf8cc36 rc47e1a8 37 37 38 38 #include <arch/elf.h> 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 41 41 /** 42 42 * current ELF version 43 43 */ 44 #define 45 46 /** 47 * ELF types 44 #define EV_CURRENT 1 45 46 /** 47 * ELF types 48 48 */ 49 49 #define ET_NONE 0 /* No type */ … … 338 338 #endif 339 339 340 extern c har *elf_error(unsigned int rc);340 extern const char *elf_error(unsigned int rc); 341 341 342 342 /* Interpreter string used to recognize the program loader */ -
kernel/generic/include/lib/rd.h
rcf8cc36 rc47e1a8 36 36 #define KERN_RD_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 /** 41 41 * RAM disk version 42 42 */ 43 #define 43 #define RD_VERSION 1 44 44 45 45 /** -
kernel/generic/include/macros.h
rcf8cc36 rc47e1a8 38 38 #ifndef __ASM__ 39 39 40 #include < arch/types.h>40 #include <typedefs.h> 41 41 42 42 /** Return true if the intervals overlap. … … 84 84 #define STRING_ARG(arg) #arg 85 85 86 #define LOWER32(arg) (( arg) & 0xffffffff)87 #define UPPER32(arg) ((( arg) >> 32) & 0xffffffff)86 #define LOWER32(arg) (((uint64_t) (arg)) & 0xffffffff) 87 #define UPPER32(arg) (((((uint64_t) arg)) >> 32) & 0xffffffff) 88 88 89 89 #define MERGE_LOUP32(lo, up) \ -
kernel/generic/include/main/main.h
rcf8cc36 rc47e1a8 36 36 #define KERN_MAIN_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 extern size_t hardcoded_kdata_size; -
kernel/generic/include/main/uinit.h
rcf8cc36 rc47e1a8 36 36 #define KERN_UINIT_H_ 37 37 38 #include <arch/types.h>39 40 38 extern void uinit(void *arg); 41 39 -
kernel/generic/include/memstr.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_MEMSTR_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <arch/memstr.h> 40 40 -
kernel/generic/include/mm/as.h
rcf8cc36 rc47e1a8 1 1 /* 2 * Copyright (c) 20 01-2004Jakub Jermar2 * Copyright (c) 2010 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 37 37 38 38 #ifdef KERNEL 39 #include <arch/types.h>39 #include <typedefs.h> 40 40 #else 41 #include <sys/types.h>41 #include <sys/types.h> 42 42 #endif 43 43 … … 65 65 #include <arch/mm/as.h> 66 66 #include <arch/mm/asid.h> 67 #include < arch/types.h>67 #include <typedefs.h> 68 68 #include <synch/spinlock.h> 69 69 #include <synch/mutex.h> … … 227 227 extern void as_init(void); 228 228 229 extern as_t *as_create(int flags);230 extern void as_destroy(as_t * as);231 extern void as_ switch(as_t *old_as, as_t *new_as);232 extern int as_page_fault(uintptr_t page, pf_access_t access, istate_t *istate);233 234 extern as_area_t *as_area_create(as_t *as, int flags, size_t size,235 uintptr_t base, int attrs, mem_backend_t *backend, 236 mem_backend_data_t *backend_data); 237 extern int as_area_destroy(as_t *as, uintptr_t address); 238 extern int as_area_ resize(as_t *as, uintptr_t address, size_t size, int flags);239 int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size, 240 as_t *dst_as, uintptr_t dst_base, int dst_flags_mask);241 extern int as_area_change_flags(as_t * as, int flags, uintptr_t address);242 243 extern int as_area_get_flags(as_area_t * area);244 extern bool as_area_check_access(as_area_t * area, pf_access_t access);245 extern size_t as_area_get_size(uintptr_t base);246 extern int used_space_insert(as_area_t * a, uintptr_t page, size_t count);247 extern int used_space_remove(as_area_t * a, uintptr_t page, size_t count);229 extern as_t *as_create(int); 230 extern void as_destroy(as_t *); 231 extern void as_hold(as_t *); 232 extern void as_release(as_t *); 233 extern void as_switch(as_t *, as_t *); 234 extern int as_page_fault(uintptr_t, pf_access_t, istate_t *); 235 236 extern as_area_t *as_area_create(as_t *, int, size_t, uintptr_t, int, 237 mem_backend_t *, mem_backend_data_t *); 238 extern int as_area_destroy(as_t *, uintptr_t); 239 extern int as_area_resize(as_t *, uintptr_t, size_t, int); 240 extern int as_area_share(as_t *, uintptr_t, size_t, as_t *, uintptr_t, int); 241 extern int as_area_change_flags(as_t *, int, uintptr_t); 242 243 extern int as_area_get_flags(as_area_t *); 244 extern bool as_area_check_access(as_area_t *, pf_access_t); 245 extern size_t as_area_get_size(uintptr_t); 246 extern int used_space_insert(as_area_t *, uintptr_t, size_t); 247 extern int used_space_remove(as_area_t *, uintptr_t, size_t); 248 248 249 249 250 250 /* Interface to be implemented by architectures. */ 251 251 #ifndef as_constructor_arch 252 extern int as_constructor_arch(as_t * as, int flags);252 extern int as_constructor_arch(as_t *, int); 253 253 #endif /* !def as_constructor_arch */ 254 254 #ifndef as_destructor_arch 255 extern int as_destructor_arch(as_t * as);255 extern int as_destructor_arch(as_t *); 256 256 #endif /* !def as_destructor_arch */ 257 257 #ifndef as_create_arch 258 extern int as_create_arch(as_t * as, int flags);258 extern int as_create_arch(as_t *, int); 259 259 #endif /* !def as_create_arch */ 260 260 #ifndef as_install_arch 261 extern void as_install_arch(as_t * as);261 extern void as_install_arch(as_t *); 262 262 #endif /* !def as_install_arch */ 263 263 #ifndef as_deinstall_arch 264 extern void as_deinstall_arch(as_t * as);264 extern void as_deinstall_arch(as_t *); 265 265 #endif /* !def as_deinstall_arch */ 266 266 … … 277 277 #define ELD_F_LOADER 1 278 278 279 extern unsigned int elf_load(elf_header_t * header, as_t *as, int flags);279 extern unsigned int elf_load(elf_header_t *, as_t *, int); 280 280 281 281 /* Address space area related syscalls. */ 282 extern unative_t sys_as_area_create(uintptr_t address, size_t size, int flags);283 extern unative_t sys_as_area_resize(uintptr_t address, size_t size, int flags);284 extern unative_t sys_as_area_change_flags(uintptr_t address, int flags);285 extern unative_t sys_as_area_destroy(uintptr_t address);282 extern unative_t sys_as_area_create(uintptr_t, size_t, int); 283 extern unative_t sys_as_area_resize(uintptr_t, size_t, int); 284 extern unative_t sys_as_area_change_flags(uintptr_t, int); 285 extern unative_t sys_as_area_destroy(uintptr_t); 286 286 287 287 /* Introspection functions. */ 288 extern void as_get_area_info(as_t * as, as_area_info_t **obuf, size_t *osize);289 extern void as_print(as_t * as);288 extern void as_get_area_info(as_t *, as_area_info_t **, size_t *); 289 extern void as_print(as_t *); 290 290 291 291 #endif /* KERNEL */ -
kernel/generic/include/mm/buddy.h
rcf8cc36 rc47e1a8 36 36 #define KERN_BUDDY_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <adt/list.h> 40 40 -
kernel/generic/include/mm/frame.h
rcf8cc36 rc47e1a8 37 37 #define KERN_FRAME_H_ 38 38 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 #include <adt/list.h> 41 41 #include <mm/buddy.h> … … 169 169 extern bool zone_merge(size_t, size_t); 170 170 extern void zone_merge_all(void); 171 extern uint64_t zone_total_size(void); 171 extern uint64_t zones_total_size(void); 172 extern void zones_stats(uint64_t *, uint64_t *, uint64_t *, uint64_t *); 172 173 173 174 /* 174 175 * Console functions 175 176 */ 176 extern void zone _print_list(void);177 extern void zones_print_list(void); 177 178 extern void zone_print_one(size_t); 178 179 -
kernel/generic/include/mm/page.h
rcf8cc36 rc47e1a8 36 36 #define KERN_PAGE_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <mm/as.h> 40 40 #include <memstr.h> -
kernel/generic/include/mm/slab.h
rcf8cc36 rc47e1a8 86 86 87 87 typedef struct { 88 c har *name;88 const char *name; 89 89 90 90 link_t link; … … 123 123 } slab_cache_t; 124 124 125 extern slab_cache_t *slab_cache_create(c har *, size_t, size_t,125 extern slab_cache_t *slab_cache_create(const char *, size_t, size_t, 126 126 int (*)(void *, int), int (*)(void *), int); 127 127 extern void slab_cache_destroy(slab_cache_t *); -
kernel/generic/include/mm/tlb.h
rcf8cc36 rc47e1a8 37 37 38 38 #include <arch/mm/asid.h> 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 41 41 /** -
kernel/generic/include/panic.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_PANIC_H_ 37 37 38 #include <typedefs.h> 38 39 #include <stacktrace.h> 39 40 #include <print.h> … … 42 43 # define panic(format, ...) \ 43 44 do { \ 45 silent = false; \ 44 46 printf("Kernel panic in %s() at %s:%u.\n", \ 45 47 __func__, __FILE__, __LINE__); \ … … 50 52 #else 51 53 # define panic(format, ...) \ 52 panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); 54 do { \ 55 silent = false; \ 56 panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); \ 57 } while (0) 53 58 #endif 54 59 55 extern void panic_printf(char *fmt, ...) __attribute__((noreturn)); 60 extern bool silent; 61 62 extern void panic_printf(const char *fmt, ...) __attribute__((noreturn)); 56 63 57 64 #endif -
kernel/generic/include/preemption.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ -
kernel/generic/include/print.h
rcf8cc36 rc47e1a8 36 36 #define KERN_PRINT_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <stdarg.h> 40 40 41 #define EOF (-1)41 #define EOF (-1) 42 42 43 43 extern int puts(const char *s); -
kernel/generic/include/printf/printf_core.h
rcf8cc36 rc47e1a8 51 51 } printf_spec_t; 52 52 53 int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);53 extern int printf_core(const char *fmt, printf_spec_t *ps, va_list ap); 54 54 55 55 #endif -
kernel/generic/include/proc/program.h
rcf8cc36 rc47e1a8 36 36 #define KERN_PROGRAM_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 struct task; … … 45 45 * A program is an abstraction of a freshly created (not yet running) 46 46 * userspace task containing a main thread along with its userspace stack. 47 * 47 48 */ 48 49 typedef struct program { 49 struct task *task; 50 struct thread *main_thread; 50 struct task *task; /**< Program task */ 51 struct thread *main_thread; /**< Program main thread */ 51 52 } program_t; 52 53 53 54 extern void *program_loader; 54 55 55 extern void program_create(as_t *as, uintptr_t entry_addr, char *name, 56 program_t *p); 57 extern int program_create_from_image(void *image_addr, char *name, 58 program_t *p); 59 extern int program_create_loader(program_t *p, char *name); 60 extern void program_ready(program_t *p); 56 extern int program_create(as_t *, uintptr_t, char *, program_t *); 57 extern int program_create_from_image(void *, char *, program_t *); 58 extern int program_create_loader(program_t *, char *); 59 extern void program_ready(program_t *); 61 60 62 extern unative_t sys_program_spawn_loader(char * uspace_name, size_t name_len);61 extern unative_t sys_program_spawn_loader(char *, size_t); 63 62 64 63 #endif -
kernel/generic/include/proc/scheduler.h
rcf8cc36 rc47e1a8 37 37 38 38 #include <synch/spinlock.h> 39 #include <time/clock.h> /* HZ */ 39 #include <time/clock.h> 40 #include <typedefs.h> 40 41 #include <atomic.h> 41 42 #include <adt/list.h> 42 43 43 #define RQ_COUNT 44 #define NEEDS_RELINK_MAX 44 #define RQ_COUNT 16 45 #define NEEDS_RELINK_MAX (HZ) 45 46 46 47 /** Scheduler run queue structure. */ 47 48 typedef struct { 48 49 SPINLOCK_DECLARE(lock); 49 link_t rq_head; 50 size_t n; 50 link_t rq_head; /**< List of ready threads. */ 51 size_t n; /**< Number of threads in rq_ready. */ 51 52 } runq_t; 52 53 … … 61 62 62 63 /* 63 * To be defined by architectures :64 * To be defined by architectures. 64 65 */ 65 66 extern void before_task_runs_arch(void); -
kernel/generic/include/proc/task.h
rcf8cc36 rc47e1a8 1 1 /* 2 * Copyright (c) 20 01-2004Jakub Jermar2 * Copyright (c) 2010 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 56 56 #include <ipc/kbox.h> 57 57 #include <mm/as.h> 58 59 #define TASK_NAME_BUFLEN 20 58 #include <sysinfo/abi.h> 60 59 61 60 struct thread; … … 81 80 task_id_t taskid; 82 81 /** Task security context. */ 83 context_id_t context; 82 context_id_t context; 84 83 85 84 /** Number of references (i.e. threads). */ … … 89 88 90 89 /** Task capabilities. */ 91 cap_t capabilities; 90 cap_t capabilities; 92 91 93 92 /* IPC stuff */ 94 93 answerbox_t answerbox; /**< Communication endpoint */ 95 94 phone_t phones[IPC_MAX_PHONES]; 95 stats_ipc_t ipc_info; /**< IPC statistics */ 96 96 /** 97 97 * Active asynchronous messages. It is used for limiting uspace to … … 119 119 mutex_t futexes_lock; 120 120 /** B+tree of futexes referenced by this task. */ 121 btree_t futexes; 121 btree_t futexes; 122 122 123 123 /** Accumulated accounting. */ 124 uint64_t cycles; 124 uint64_t ucycles; 125 uint64_t kcycles; 125 126 } task_t; 126 127 … … 130 131 extern void task_init(void); 131 132 extern void task_done(void); 132 extern task_t *task_create(as_t *as, char *name); 133 extern void task_destroy(task_t *t); 134 extern task_t *task_find_by_id(task_id_t id); 135 extern int task_kill(task_id_t id); 136 extern uint64_t task_get_accounting(task_t *t); 133 extern task_t *task_create(as_t *, const char *); 134 extern void task_destroy(task_t *); 135 extern void task_hold(task_t *); 136 extern void task_release(task_t *); 137 extern task_t *task_find_by_id(task_id_t); 138 extern int task_kill(task_id_t); 139 extern void task_get_accounting(task_t *, uint64_t *, uint64_t *); 137 140 extern void task_print_list(void); 138 141 139 extern void cap_set(task_t * t, cap_t caps);140 extern cap_t cap_get(task_t * t);142 extern void cap_set(task_t *, cap_t); 143 extern cap_t cap_get(task_t *); 141 144 142 145 #ifndef task_create_arch 143 extern void task_create_arch(task_t * t);146 extern void task_create_arch(task_t *); 144 147 #endif 145 148 146 149 #ifndef task_destroy_arch 147 extern void task_destroy_arch(task_t * t);150 extern void task_destroy_arch(task_t *); 148 151 #endif 149 152 150 extern unative_t sys_task_get_id(task_id_t * uspace_task_id);151 extern unative_t sys_task_set_name(const char * uspace_name, size_t name_len);153 extern unative_t sys_task_get_id(task_id_t *); 154 extern unative_t sys_task_set_name(const char *, size_t); 152 155 153 156 #endif -
kernel/generic/include/proc/thread.h
rcf8cc36 rc47e1a8 48 48 #include <proc/uarg.h> 49 49 #include <udebug/udebug.h> 50 #include <sysinfo/abi.h> 50 51 51 52 #define THREAD_STACK_SIZE STACK_SIZE 52 53 #define THREAD_NAME_BUFLEN 20 53 54 54 extern c har *thread_states[];55 extern const char *thread_states[]; 55 56 56 57 /* Thread flags */ … … 69 70 #define THREAD_FLAG_NOATTACH (1 << 3) 70 71 71 /** Thread states. */72 typedef enum {73 /** It is an error, if thread is found in this state. */74 Invalid,75 /** State of a thread that is currently executing on some CPU. */76 Running,77 /** Thread in this state is waiting for an event. */78 Sleeping,79 /** State of threads in a run queue. */80 Ready,81 /** Threads are in this state before they are first readied. */82 Entering,83 /** After a thread calls thread_exit(), it is put into Exiting state. */84 Exiting,85 /** Threads that were not detached but exited are Lingering. */86 Lingering87 } state_t;88 89 72 /** Thread structure. There is one per thread. */ 90 73 typedef struct thread { … … 189 172 190 173 /** Thread accounting. */ 191 uint64_t cycles; 174 uint64_t ucycles; 175 uint64_t kcycles; 192 176 /** Last sampled cycle. */ 193 177 uint64_t last_cycle; … … 225 209 226 210 extern void thread_init(void); 227 extern thread_t *thread_create(void (*)(void *), void *, task_t *, int, char *,228 bool);211 extern thread_t *thread_create(void (*)(void *), void *, task_t *, int, 212 const char *, bool); 229 213 extern void thread_attach(thread_t *, task_t *); 230 214 extern void thread_ready(thread_t *); … … 252 236 extern void thread_print_list(void); 253 237 extern void thread_destroy(thread_t *); 254 extern void thread_update_accounting(void); 238 extern thread_t *thread_find_by_id(thread_id_t); 239 extern void thread_update_accounting(bool); 255 240 extern bool thread_exists(thread_t *); 256 241 -
kernel/generic/include/security/cap.h
rcf8cc36 rc47e1a8 49 49 50 50 #include <syscall/sysarg64.h> 51 #include < arch/types.h>51 #include <typedefs.h> 52 52 53 53 /** -
kernel/generic/include/smp/ipi.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 37 37 38 38 #ifdef CONFIG_SMP 39 extern void ipi_broadcast(int ipi); 40 extern void ipi_broadcast_arch(int ipi); 39 40 extern void ipi_broadcast(int); 41 extern void ipi_broadcast_arch(int); 42 41 43 #else 42 #define ipi_broadcast(x) ; 44 45 #define ipi_broadcast(ipi) 46 43 47 #endif /* CONFIG_SMP */ 44 48 -
kernel/generic/include/sort.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_SORT_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 /* -
kernel/generic/include/stacktrace.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup genericdebug 29 /** @addtogroup genericdebug 30 30 * @{ 31 31 */ … … 36 36 #define KERN_STACKTRACE_H_ 37 37 38 #include <arch/types.h>39 38 #include <typedefs.h> 40 39 … … 46 45 bool (* frame_pointer_prev)(uintptr_t, uintptr_t *); 47 46 bool (* return_address_get)(uintptr_t, uintptr_t *); 48 bool (* symbol_resolve)(uintptr_t, c har **, uintptr_t *);47 bool (* symbol_resolve)(uintptr_t, const char **, uintptr_t *); 49 48 } stack_trace_ops_t; 50 49 … … 60 59 */ 61 60 extern uintptr_t frame_pointer_get(void); 62 extern uintptr_t program_counter_get( );61 extern uintptr_t program_counter_get(void); 63 62 64 63 extern bool kernel_frame_pointer_validate(uintptr_t); -
kernel/generic/include/str.h
rcf8cc36 rc47e1a8 33 33 */ 34 34 35 #ifndef KERN_STR ING_H_36 #define KERN_STR ING_H_35 #ifndef KERN_STR_H_ 36 #define KERN_STR_H_ 37 37 38 38 #include <typedefs.h> … … 89 89 extern void wstr_to_str(char *dest, size_t size, const wchar_t *src); 90 90 91 extern char *str_dup(const char *src); 92 extern char *str_ndup(const char *src, size_t n); 93 91 94 extern char *str_chr(const char *str, wchar_t ch); 92 95 … … 94 97 extern bool wstr_remove(wchar_t *str, size_t pos); 95 98 99 extern int str_uint64(const char *, char **, unsigned int, bool, uint64_t *); 100 101 extern void order_suffix(const uint64_t val, uint64_t *rv, char *suffix); 102 96 103 #endif 97 104 -
kernel/generic/include/symtab.h
rcf8cc36 rc47e1a8 36 36 #define KERN_SYMTAB_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 #define MAX_SYMBOL_NAME 64 … … 45 45 }; 46 46 47 extern int symtab_name_lookup(uintptr_t, c har **, uintptr_t *);48 extern c har *symtab_fmt_name_lookup(uintptr_t);47 extern int symtab_name_lookup(uintptr_t, const char **, uintptr_t *); 48 extern const char *symtab_fmt_name_lookup(uintptr_t); 49 49 extern int symtab_addr_lookup(const char *, uintptr_t *); 50 50 extern void symtab_print_search(const char *); -
kernel/generic/include/synch/condvar.h
rcf8cc36 rc47e1a8 36 36 #define KERN_CONDVAR_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <synch/waitq.h> 40 40 #include <synch/mutex.h> -
kernel/generic/include/synch/futex.h
rcf8cc36 rc47e1a8 36 36 #define KERN_FUTEX_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <synch/waitq.h> 40 40 -
kernel/generic/include/synch/mutex.h
rcf8cc36 rc47e1a8 36 36 #define KERN_MUTEX_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <synch/semaphore.h> 40 40 #include <synch/synch.h> -
kernel/generic/include/synch/rwlock.h
rcf8cc36 rc47e1a8 36 36 #define KERN_RWLOCK_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <synch/mutex.h> 40 40 #include <synch/synch.h> -
kernel/generic/include/synch/semaphore.h
rcf8cc36 rc47e1a8 36 36 #define KERN_SEMAPHORE_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <synch/waitq.h> 40 40 #include <synch/synch.h> -
kernel/generic/include/synch/spinlock.h
rcf8cc36 rc47e1a8 36 36 #define KERN_SPINLOCK_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <arch/barrier.h> 40 40 #include <preemption.h> … … 48 48 49 49 #ifdef CONFIG_DEBUG_SPINLOCK 50 c har *name;50 const char *name; 51 51 #endif 52 52 } spinlock_t; … … 77 77 } 78 78 79 #define spinlock_lock(lock) spinlock_lock_debug(lock) 79 #define spinlock_lock(lock) spinlock_lock_debug((lock)) 80 #define spinlock_unlock(lock) spinlock_unlock_debug((lock)) 80 81 81 82 #else … … 91 92 } 92 93 93 #define spinlock_lock(lock) atomic_lock_arch(&(lock)->val) 94 #define spinlock_lock(lock) atomic_lock_arch(&(lock)->val) 95 #define spinlock_unlock(lock) spinlock_unlock_nondebug((lock)) 94 96 95 97 #endif … … 101 103 SPINLOCK_STATIC_INITIALIZE_NAME(lock_name, #lock_name) 102 104 103 extern void spinlock_initialize(spinlock_t *lock, c har *name);105 extern void spinlock_initialize(spinlock_t *lock, const char *name); 104 106 extern int spinlock_trylock(spinlock_t *lock); 105 107 extern void spinlock_lock_debug(spinlock_t *lock); 108 extern void spinlock_unlock_debug(spinlock_t *lock); 106 109 107 110 /** Unlock spinlock 108 111 * 109 * Unlock spinlock .112 * Unlock spinlock for non-debug kernels. 110 113 * 111 114 * @param sl Pointer to spinlock_t structure. 112 115 */ 113 static inline void spinlock_unlock (spinlock_t *lock)116 static inline void spinlock_unlock_nondebug(spinlock_t *lock) 114 117 { 115 ASSERT(atomic_get(&lock->val) != 0);116 117 118 /* 118 119 * Prevent critical section code from bleeding out this way down. -
kernel/generic/include/synch/waitq.h
rcf8cc36 rc47e1a8 36 36 #define KERN_WAITQ_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <synch/spinlock.h> 40 40 #include <synch/synch.h> -
kernel/generic/include/syscall/copy.h
rcf8cc36 rc47e1a8 36 36 #define KERN_COPY_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 /** Label within memcpy_from_uspace() that contains return -1. */ -
kernel/generic/include/syscall/syscall.h
rcf8cc36 rc47e1a8 71 71 SYS_IPC_REGISTER_IRQ, 72 72 SYS_IPC_UNREGISTER_IRQ, 73 73 74 74 SYS_EVENT_SUBSCRIBE, 75 75 … … 83 83 SYS_INTERRUPT_ENABLE, 84 84 85 SYS_SYSINFO_VALID, 86 SYS_SYSINFO_VALUE, 85 SYS_SYSINFO_GET_TAG, 86 SYS_SYSINFO_GET_VALUE, 87 SYS_SYSINFO_GET_DATA_SIZE, 88 SYS_SYSINFO_GET_DATA, 87 89 88 90 SYS_DEBUG_ENABLE_CONSOLE, 89 91 SYS_DEBUG_DISABLE_CONSOLE, 92 90 93 SYS_IPC_CONNECT_KBOX, 91 94 SYSCALL_END … … 94 97 #ifdef KERNEL 95 98 96 #include < arch/types.h>99 #include <typedefs.h> 97 100 98 101 typedef unative_t (*syshandler_t)(unative_t, unative_t, unative_t, unative_t, -
kernel/generic/include/sysinfo/sysinfo.h
rcf8cc36 rc47e1a8 36 36 #define KERN_SYSINFO_H_ 37 37 38 #include < arch/types.h>39 #include <str ing.h>38 #include <typedefs.h> 39 #include <str.h> 40 40 41 /** Framebuffer info exported flags */ 41 42 extern bool fb_exported; 42 43 43 typedef union sysinfo_item_val { 44 unative_t val; 45 void *fn; 44 /** Item value type 45 * 46 */ 47 typedef enum { 48 SYSINFO_VAL_UNDEFINED = 0, /**< Undefined value */ 49 SYSINFO_VAL_VAL = 1, /**< Constant numeric value */ 50 SYSINFO_VAL_DATA = 2, /**< Constant binary data */ 51 SYSINFO_VAL_FUNCTION_VAL = 3, /**< Generated numeric value */ 52 SYSINFO_VAL_FUNCTION_DATA = 4 /**< Generated binary data */ 53 } sysinfo_item_val_type_t; 54 55 /** Subtree type 56 * 57 */ 58 typedef enum { 59 SYSINFO_SUBTREE_NONE = 0, /**< No subtree (leaf item) */ 60 SYSINFO_SUBTREE_TABLE = 1, /**< Fixed subtree */ 61 SYSINFO_SUBTREE_FUNCTION = 2 /**< Generated subtree */ 62 } sysinfo_subtree_type_t; 63 64 struct sysinfo_item; 65 66 /** Gerated numeric value function */ 67 typedef unative_t (*sysinfo_fn_val_t)(struct sysinfo_item *); 68 69 /** Generated binary data function */ 70 typedef void *(*sysinfo_fn_data_t)(struct sysinfo_item *, size_t *, bool); 71 72 /** Sysinfo item binary data 73 * 74 */ 75 typedef struct { 76 void *data; /**< Data */ 77 size_t size; /**< Size (bytes) */ 78 } sysinfo_data_t; 79 80 /** Sysinfo item value (union) 81 * 82 */ 83 typedef union { 84 unative_t val; /**< Constant numberic value */ 85 sysinfo_fn_val_t fn_val; /**< Generated numeric value function */ 86 sysinfo_fn_data_t fn_data; /**< Generated binary data function */ 87 sysinfo_data_t data; /**< Constant binary data */ 46 88 } sysinfo_item_val_t; 47 89 90 /** Sysinfo return holder 91 * 92 * This structure is generated from the constant 93 * items or by the generating functions. Note that 94 * the validity of the data is limited by the scope 95 * of single sysinfo invocation guarded by sysinfo_lock. 96 * 97 */ 98 typedef struct { 99 sysinfo_item_val_type_t tag; /**< Return value type */ 100 union { 101 unative_t val; /**< Numberic value */ 102 sysinfo_data_t data; /**< Binary data */ 103 }; 104 } sysinfo_return_t; 105 106 /** Generated subtree function */ 107 typedef sysinfo_return_t (*sysinfo_fn_subtree_t)(const char *, bool); 108 109 /** Sysinfo subtree (union) 110 * 111 */ 112 typedef union { 113 struct sysinfo_item *table; /**< Fixed subtree (list of subitems) */ 114 sysinfo_fn_subtree_t get_data; /**< Generated subtree function */ 115 } sysinfo_subtree_t; 116 117 /** Sysinfo item 118 * 119 */ 48 120 typedef struct sysinfo_item { 49 char *name; 50 union { 51 unative_t val; 52 void *fn; 53 } val; 54 55 union { 56 struct sysinfo_item *table; 57 void *fn; 58 } subinfo; 59 60 struct sysinfo_item *next; 61 int val_type; 62 int subinfo_type; 121 char *name; /**< Item name */ 122 123 sysinfo_item_val_type_t val_type; /**< Item value type */ 124 sysinfo_item_val_t val; /**< Item value */ 125 126 sysinfo_subtree_type_t subtree_type; /**< Subtree type */ 127 sysinfo_subtree_t subtree; /**< Subtree */ 128 129 struct sysinfo_item *next; /**< Sibling item */ 63 130 } sysinfo_item_t; 64 131 65 #define SYSINFO_VAL_VAL 0 66 #define SYSINFO_VAL_FUNCTION 1 67 #define SYSINFO_VAL_UNDEFINED U_SPECIAL 132 extern void sysinfo_set_item_val(const char *, sysinfo_item_t **, unative_t); 133 extern void sysinfo_set_item_data(const char *, sysinfo_item_t **, void *, 134 size_t); 135 extern void sysinfo_set_item_fn_val(const char *, sysinfo_item_t **, 136 sysinfo_fn_val_t); 137 extern void sysinfo_set_item_fn_data(const char *, sysinfo_item_t **, 138 sysinfo_fn_data_t); 139 extern void sysinfo_set_item_undefined(const char *, sysinfo_item_t **); 68 140 69 #define SYSINFO_SUBINFO_NONE 0 70 #define SYSINFO_SUBINFO_TABLE 1 71 #define SYSINFO_SUBINFO_FUNCTION 2 141 extern void sysinfo_set_subtree_fn(const char *, sysinfo_item_t **, 142 sysinfo_fn_subtree_t); 72 143 73 typedef unative_t (*sysinfo_val_fn_t)(sysinfo_item_t *root);74 typedef unative_t (*sysinfo_subinfo_fn_t)(const char *subname);144 extern void sysinfo_init(void); 145 extern void sysinfo_dump(sysinfo_item_t *); 75 146 76 typedef struct sysinfo_rettype { 77 unative_t val; 78 unative_t valid; 79 } sysinfo_rettype_t; 80 81 void sysinfo_set_item_val(const char *name, sysinfo_item_t **root, unative_t val); 82 void sysinfo_dump(sysinfo_item_t **root, int depth); 83 void sysinfo_set_item_function(const char *name, sysinfo_item_t **root, sysinfo_val_fn_t fn); 84 void sysinfo_set_item_undefined(const char *name, sysinfo_item_t **root); 85 86 sysinfo_rettype_t sysinfo_get_val(const char *name, sysinfo_item_t **root); 87 88 unative_t sys_sysinfo_valid(unative_t ptr, unative_t len); 89 unative_t sys_sysinfo_value(unative_t ptr, unative_t len); 147 extern unative_t sys_sysinfo_get_tag(void *, size_t); 148 extern unative_t sys_sysinfo_get_value(void *, size_t, void *); 149 extern unative_t sys_sysinfo_get_data_size(void *, size_t, void *); 150 extern unative_t sys_sysinfo_get_data(void *, size_t, void *, size_t); 90 151 91 152 #endif -
kernel/generic/include/time/clock.h
rcf8cc36 rc47e1a8 36 36 #define KERN_CLOCK_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 #define HZ 40 #define HZ 100 41 41 42 42 /** Uptime structure */ -
kernel/generic/include/time/delay.h
rcf8cc36 rc47e1a8 36 36 #define KERN_DELAY_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 40 40 extern void delay(uint32_t microseconds); -
kernel/generic/include/time/timeout.h
rcf8cc36 rc47e1a8 36 36 #define KERN_TIMEOUT_H_ 37 37 38 #include < arch/types.h>38 #include <typedefs.h> 39 39 #include <adt/list.h> 40 40 #include <cpu.h> -
kernel/generic/include/typedefs.h
rcf8cc36 rc47e1a8 36 36 #define KERN_TYPEDEFS_H_ 37 37 38 #include <arch/common.h> 38 39 #include <arch/types.h> 39 40 40 #define NULL 0 41 #define false 0 42 #define true 1 41 #define NULL 0 42 43 #define false 0 44 #define true 1 45 46 typedef struct { 47 uint64_t lo; 48 int64_t hi; 49 } int128_t; 50 51 typedef struct { 52 uint64_t lo; 53 uint64_t hi; 54 } uint128_t; 55 56 typedef struct { 57 volatile atomic_count_t count; 58 } atomic_t; 43 59 44 60 typedef void (* function)(); -
kernel/generic/include/userspace.h
rcf8cc36 rc47e1a8 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 37 37 38 38 #include <proc/thread.h> 39 #include < arch/types.h>39 #include <typedefs.h> 40 40 41 41 /** Switch to user-space (CPU user priviledge level) */
Note:
See TracChangeset
for help on using the changeset viewer.