Changeset e71a61d in mainline


Ignore:
Timestamp:
2007-01-22T14:45:07Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
51baa8a
Parents:
726e1043
Message:

typedef elimination

Location:
kernel
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/include/fb/fb.h

    r726e1043 re71a61d  
    3636#define KERN_FB_H_
    3737
    38 #include <typedefs.h>
    3938#include <arch/types.h>
     39#include <synch/spinlock.h>
    4040
    4141extern spinlock_t fb_lock;
  • kernel/genarch/include/mm/page_ht.h

    r726e1043 re71a61d  
    4141
    4242#include <mm/page.h>
    43 #include <typedefs.h>
     43#include <synch/mutex.h>
    4444#include <arch/types.h>
    4545#include <adt/list.h>
  • kernel/generic/include/mm/asid.h

    r726e1043 re71a61d  
    4444
    4545#include <arch/mm/asid.h>
     46#include <synch/spinlock.h>
    4647#include <typedefs.h>
    4748
  • kernel/generic/include/synch/condvar.h

    r726e1043 re71a61d  
    3838#include <arch/types.h>
    3939#include <synch/waitq.h>
    40 #include <typedefs.h>
     40#include <synch/mutex.h>
    4141#include <synch/synch.h>
    4242
    43 struct condvar {
     43typedef struct {
    4444        waitq_t wq;
    45 };
     45} condvar_t;
    4646
    4747#define condvar_wait(cv,mtx) \
  • kernel/generic/include/synch/futex.h

    r726e1043 re71a61d  
    4343
    4444/** Kernel-side futex structure. */
    45 struct futex {
     45typedef struct {
    4646        uintptr_t paddr;        /**< Physical address of the status variable. */
    4747        waitq_t wq;             /**< Wait queue for threads waiting for futex availability. */
    4848        link_t ht_link;         /**< Futex hash table link. */
    4949        count_t refcount;       /**< Number of tasks that reference this futex. */
    50 };
     50} futex_t;
    5151
    5252extern void futex_init(void);
  • kernel/generic/include/synch/mutex.h

    r726e1043 re71a61d  
    4141#include <synch/synch.h>
    4242
    43 struct mutex {
     43typedef struct {
    4444        semaphore_t sem;
    45 };
     45} mutex_t;
    4646
    4747#define mutex_lock(mtx) \
  • kernel/generic/include/synch/rwlock.h

    r726e1043 re71a61d  
    4242#include <synch/spinlock.h>
    4343
    44 enum rwlock_type {
     44typedef enum {
    4545        RWLOCK_NONE,
    4646        RWLOCK_READER,
    4747        RWLOCK_WRITER
    48 };
     48} rwlock_type_t;
    4949
    50 struct rwlock {
     50typedef struct {
    5151        SPINLOCK_DECLARE(lock);
    5252        mutex_t exclusive;      /**< Mutex for writers, readers can bypass it if readers_in is positive. */
    5353        count_t readers_in;     /**< Number of readers in critical section. */
    54 };
     54} rwlock_t;
    5555
    5656#define rwlock_write_lock(rwl) \
  • kernel/generic/include/synch/semaphore.h

    r726e1043 re71a61d  
    4141#include <synch/synch.h>
    4242
    43 struct semaphore
    44 {
     43typedef struct {
    4544        waitq_t wq;
    46 };
     45} semaphore_t;
    4746
    4847#define semaphore_down(s) \
  • kernel/generic/include/synch/spinlock.h

    r726e1043 re71a61d  
    4343
    4444#ifdef CONFIG_SMP
    45 struct spinlock {
     45typedef struct {
    4646#ifdef CONFIG_DEBUG_SPINLOCK
    4747        char *name;
    4848#endif
    4949        atomic_t val;
    50 };
     50} spinlock_t;
    5151
    5252/*
     
    104104#else
    105105
     106typedef void spinlock_t;
     107
    106108/* On UP systems, spinlocks are effectively left out. */
    107109#define SPINLOCK_DECLARE(name)
  • kernel/generic/include/synch/waitq.h

    r726e1043 re71a61d  
    4646
    4747/** Wait queue structure. */
    48 struct waitq {
     48typedef struct {
    4949
    5050        /** Lock protecting wait queue structure.
     
    5656        int missed_wakeups;     /**< Number of waitq_wakeup() calls that didn't find a thread to wake up. */
    5757        link_t head;            /**< List of sleeping threads for wich there was no missed_wakeup. */
    58 };
     58} waitq_t;
    5959
    6060#define waitq_sleep(wq) \
  • kernel/generic/include/typedefs.h

    r726e1043 re71a61d  
    5151typedef struct thread thread_t;
    5252
    53 typedef struct spinlock spinlock_t;
    54 typedef struct mutex mutex_t;
    55 typedef struct semaphore semaphore_t;
    56 typedef struct rwlock rwlock_t;
    57 typedef enum rwlock_type rwlock_type_t;
    58 typedef struct condvar condvar_t;
    59 typedef struct waitq waitq_t;
    60 typedef struct futex futex_t;
    61 
    6253typedef struct as_area as_area_t;
    6354typedef struct as as_t;
Note: See TracChangeset for help on using the changeset viewer.