Changeset aa85487 in mainline for kernel/generic/include


Ignore:
Timestamp:
2010-03-07T15:11:56Z (16 years ago)
Author:
Lukas Mejdrech <lukasmejdrech@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aadf01e
Parents:
2e99277 (diff), 137691a (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.
Message:

Merge mainline changes, revision 308

Location:
kernel/generic/include
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/atomic.h

    r2e99277 raa85487  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_ATOMIC_H_
    3737
     38#include <arch/types.h>
     39
    3840typedef struct atomic {
    39         volatile long count;
     41        volatile atomic_count_t count;
    4042} atomic_t;
    4143
    4244#include <arch/atomic.h>
    4345
    44 static inline void atomic_set(atomic_t *val, long i)
     46static inline void atomic_set(atomic_t *val, atomic_count_t i)
    4547{
    4648        val->count = i;
    4749}
    4850
    49 static inline long atomic_get(atomic_t *val)
     51static inline atomic_count_t atomic_get(atomic_t *val)
    5052{
    5153        return val->count;
  • kernel/generic/include/bitops.h

    r2e99277 raa85487  
    6565        }
    6666       
    67         if (arg >> 1) {
    68                 arg >>= 1;
     67        if (arg >> 1)
    6968                n += 1;
    70         }
    7169       
    7270        return n;
  • kernel/generic/include/console/chardev.h

    r2e99277 raa85487  
    5353/** Character input device. */
    5454typedef struct indev {
    55         char *name;
     55        const char *name;
    5656        waitq_t wq;
    5757       
     
    8181/** Character output device. */
    8282typedef struct outdev {
    83         char *name;
     83        const char *name;
    8484       
    8585        /** Protects everything below. */
     
    9595} outdev_t;
    9696
    97 extern void indev_initialize(char *name, indev_t *indev,
     97extern void indev_initialize(const char *name, indev_t *indev,
    9898    indev_operations_t *op);
    9999extern void indev_push_character(indev_t *indev, wchar_t ch);
    100100extern wchar_t indev_pop_character(indev_t *indev);
    101101
    102 extern void outdev_initialize(char *name, outdev_t *outdev,
     102extern void outdev_initialize(const char *name, outdev_t *outdev,
    103103    outdev_operations_t *op);
    104104
  • kernel/generic/include/console/kconsole.h

    r2e99277 raa85487  
    9494extern void kconsole_notify_init(void);
    9595extern bool kconsole_check_poll(void);
    96 extern void kconsole(char *prompt, char *msg, bool kcon);
     96extern void kconsole(const char *prompt, const char *msg, bool kcon);
    9797extern void kconsole_thread(void *data);
    9898
  • kernel/generic/include/cpu.h

    r2e99277 raa85487  
    4848 * There is one structure like this for every processor.
    4949 */
    50 typedef struct {
     50typedef struct cpu {
    5151        SPINLOCK_DECLARE(lock);
    5252
  • kernel/generic/include/errno.h

    r2e99277 raa85487  
    5757#define EADDRNOTAVAIL   -12     /* Address not available. */
    5858#define ETIMEOUT        -13     /* Timeout expired */
    59 //MH
    60 #ifndef EINVAL
    6159#define EINVAL          -14     /* Invalid value */
    62 #endif
    63 #ifndef EBUSY
    6460#define EBUSY           -15     /* Resource is busy */
    65 #endif
    6661#define EOVERFLOW       -16     /* The result does not fit its size. */
    6762#define EINTR           -17     /* Operation was interrupted. */
  • kernel/generic/include/interrupt.h

    r2e99277 raa85487  
    4646typedef void (* iroutine)(int n, istate_t *istate);
    4747
    48 extern void fault_if_from_uspace(istate_t *istate, char *fmt, ...);
     48extern void fault_if_from_uspace(istate_t *istate, const char *fmt, ...);
    4949extern iroutine exc_register(int n, const char *name, iroutine f);
    5050extern void exc_dispatch(int n, istate_t *t);
  • kernel/generic/include/lib/elf.h

    r2e99277 raa85487  
    338338#endif
    339339
    340 extern char *elf_error(unsigned int rc);
     340extern const char *elf_error(unsigned int rc);
    341341
    342342/* Interpreter string used to recognize the program loader */
  • kernel/generic/include/mm/slab.h

    r2e99277 raa85487  
    8686
    8787typedef struct {
    88         char *name;
     88        const char *name;
    8989       
    9090        link_t link;
     
    123123} slab_cache_t;
    124124
    125 extern slab_cache_t *slab_cache_create(char *, size_t, size_t,
     125extern slab_cache_t *slab_cache_create(const char *, size_t, size_t,
    126126    int (*)(void *, int), int (*)(void *), int);
    127127extern void slab_cache_destroy(slab_cache_t *);
  • kernel/generic/include/panic.h

    r2e99277 raa85487  
    6060extern bool silent;
    6161
    62 extern void panic_printf(char *fmt, ...) __attribute__((noreturn));
     62extern void panic_printf(const char *fmt, ...) __attribute__((noreturn));
    6363
    6464#endif
  • kernel/generic/include/proc/task.h

    r2e99277 raa85487  
    130130extern void task_init(void);
    131131extern void task_done(void);
    132 extern task_t *task_create(as_t *as, char *name);
     132extern task_t *task_create(as_t *as, const char *name);
    133133extern void task_destroy(task_t *t);
    134134extern task_t *task_find_by_id(task_id_t id);
  • kernel/generic/include/proc/thread.h

    r2e99277 raa85487  
    5252#define THREAD_NAME_BUFLEN      20
    5353
    54 extern char *thread_states[];
     54extern const char *thread_states[];
    5555
    5656/* Thread flags */
     
    225225
    226226extern void thread_init(void);
    227 extern thread_t *thread_create(void (*)(void *), void *, task_t *, int, char *,
    228     bool);
     227extern thread_t *thread_create(void (*)(void *), void *, task_t *, int,
     228    const char *, bool);
    229229extern void thread_attach(thread_t *, task_t *);
    230230extern void thread_ready(thread_t *);
  • kernel/generic/include/stacktrace.h

    r2e99277 raa85487  
    4646        bool (* frame_pointer_prev)(uintptr_t, uintptr_t *);
    4747        bool (* return_address_get)(uintptr_t, uintptr_t *);
    48         bool (* symbol_resolve)(uintptr_t, char **, uintptr_t *);
     48        bool (* symbol_resolve)(uintptr_t, const char **, uintptr_t *);
    4949} stack_trace_ops_t;
    5050
  • kernel/generic/include/symtab.h

    r2e99277 raa85487  
    4545};
    4646
    47 extern int symtab_name_lookup(uintptr_t, char **, uintptr_t *);
    48 extern char *symtab_fmt_name_lookup(uintptr_t);
     47extern int symtab_name_lookup(uintptr_t, const char **, uintptr_t *);
     48extern const char *symtab_fmt_name_lookup(uintptr_t);
    4949extern int symtab_addr_lookup(const char *, uintptr_t *);
    5050extern void symtab_print_search(const char *);
  • kernel/generic/include/synch/spinlock.h

    r2e99277 raa85487  
    4848       
    4949#ifdef CONFIG_DEBUG_SPINLOCK
    50         char *name;
     50        const char *name;
    5151#endif
    5252} spinlock_t;
     
    101101        SPINLOCK_STATIC_INITIALIZE_NAME(lock_name, #lock_name)
    102102
    103 extern void spinlock_initialize(spinlock_t *lock, char *name);
     103extern void spinlock_initialize(spinlock_t *lock, const char *name);
    104104extern int spinlock_trylock(spinlock_t *lock);
    105105extern void spinlock_lock_debug(spinlock_t *lock);
Note: See TracChangeset for help on using the changeset viewer.