Changeset f429331 in mainline


Ignore:
Timestamp:
2007-01-21T18:52:11Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
da1f9dc
Parents:
8dbc18c
Message:

remove some typedefs in favor of anonymous structures

Location:
kernel
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/cpu.h

    r8dbc18c rf429331  
    5858#include <arch/pm.h>
    5959
    60 struct cpu_arch {
     60typedef struct {
    6161        int vendor;
    6262        int family;
     
    6666       
    6767        count_t iomapver_copy;  /** Copy of TASK's I/O Permission bitmap generation count. */
    68 };
     68} cpu_arch_t;
    6969
    7070struct star_msr {
  • kernel/arch/amd64/include/cpuid.h

    r8dbc18c rf429331  
    4747#include <arch/types.h>
    4848
    49 struct cpu_info {
     49typedef struct {
    5050        uint32_t cpuid_eax;
    5151        uint32_t cpuid_ebx;
    5252        uint32_t cpuid_ecx;
    5353        uint32_t cpuid_edx;
    54 } __attribute__ ((packed));
     54} __attribute__ ((packed)) cpu_info_t;
    5555
    5656extern int has_cpuid(void);
  • kernel/arch/amd64/src/amd64.c

    r8dbc18c rf429331  
    104104void arch_pre_mm_init(void)
    105105{
    106         struct cpu_info cpuid_s;
     106        cpu_info_t cpuid_s;
    107107
    108108        cpuid(AMD_CPUID_EXTENDED,&cpuid_s);
  • kernel/arch/ia32/include/cpu.h

    r8dbc18c rf429331  
    4343#define EFLAGS_RF       (1 << 16)
    4444
    45 struct cpu_arch {
     45typedef struct {
    4646        int vendor;
    4747        int family;
     
    5151       
    5252        count_t iomapver_copy;  /** Copy of TASK's I/O Permission bitmap generation count. */
    53 };
     53} cpu_arch_t;
    5454
    5555
  • kernel/arch/ia32/include/cpuid.h

    r8dbc18c rf429331  
    3838#include <arch/types.h>
    3939
    40 struct cpu_info {
     40typedef struct {
    4141        uint32_t cpuid_eax;
    4242        uint32_t cpuid_ebx;
    4343        uint32_t cpuid_ecx;
    4444        uint32_t cpuid_edx;
    45 } __attribute__ ((packed));
     45} __attribute__ ((packed)) cpu_info_t;
    4646
    4747struct __cpuid_extended_feature_info {
     
    9898}
    9999
    100 static inline void cpuid(uint32_t cmd, struct cpu_info *info)
     100static inline void cpuid(uint32_t cmd, cpu_info_t *info)
    101101{
    102102        __asm__ volatile (
  • kernel/arch/ia64/include/cpu.h

    r8dbc18c rf429331  
    4343#define FAMILY_ITANIUM2 0x1f
    4444
    45 struct cpu_arch {
     45typedef struct {
    4646        uint64_t cpuid0;
    4747        uint64_t cpuid1;
    4848        cpuid3_t cpuid3;
    49 };
     49} cpu_arch_t;
    5050
    5151/** Read CPUID register.
  • kernel/arch/mips32/include/cpu.h

    r8dbc18c rf429331  
    3838#include <arch/types.h>
    3939
    40 struct cpu_arch {
     40typedef struct {
    4141        uint32_t imp_num;
    4242        uint32_t rev_num;
    43 };
     43} cpu_arch_t;
    4444       
    4545#endif
  • kernel/arch/ppc32/include/cpu.h

    r8dbc18c rf429331  
    3838#include <typedefs.h>
    3939
    40 struct cpu_arch {
     40typedef struct {
    4141        int version;
    4242        int revision;
    43 };
     43} cpu_arch_t;
    4444       
    4545#endif
  • kernel/arch/ppc32/include/cpuid.h

    r8dbc18c rf429331  
    3838#include <arch/types.h>
    3939
    40 struct cpu_info {
     40typedef struct {
    4141        uint16_t version;
    4242        uint16_t revision;
    43 } __attribute__ ((packed));
     43} __attribute__ ((packed)) cpu_info_t;
    4444
    45 static inline void cpu_version(struct cpu_info *info)
     45static inline void cpu_version(cpu_info_t *info)
    4646{
    4747        asm volatile (
  • kernel/arch/ppc64/include/cpu.h

    r8dbc18c rf429331  
    3838#include <typedefs.h>
    3939
    40 struct cpu_arch {
     40typedef struct {
    4141        int version;
    4242        int revision;
    43 };
     43} cpu_arch_t;
    4444       
    4545#endif
  • kernel/arch/ppc64/include/cpuid.h

    r8dbc18c rf429331  
    3838#include <arch/types.h>
    3939
    40 struct cpu_info {
     40typedef struct {
    4141        uint16_t version;
    4242        uint16_t revision;
    43 } __attribute__ ((packed));
     43} __attribute__ ((packed)) cpu_info_t;
    4444
    45 static inline void cpu_version(struct cpu_info *info)
     45static inline void cpu_version(cpu_info_t *info)
    4646{
    4747        asm volatile (
  • kernel/arch/sparc64/include/cpu.h

    r8dbc18c rf429331  
    5252#define IMPL_SPARC64V           0x5
    5353
    54 struct cpu_arch {
     54typedef struct {
    5555        uint32_t mid;                   /**< Processor ID as read from UPA_CONFIG. */
    5656        ver_reg_t ver;
    5757        uint32_t clock_frequency;       /**< Processor frequency in Hz. */
    5858        uint64_t next_tick_cmpr;        /**< Next clock interrupt should be
    59                                          *   generated when the TICK register
    60                                          *   matches this value.
    61                                          */
    62 };
     59                                                                         generated when the TICK register
     60                                                                         matches this value. */
     61} cpu_arch_t;
    6362       
    6463#endif
  • kernel/generic/include/cpu.h

    r8dbc18c rf429331  
    5353 * There is one structure like this for every processor.
    5454 */
    55 struct cpu {
     55typedef struct {
    5656        SPINLOCK_DECLARE(lock);
    5757
     
    9292         */
    9393        uint8_t *stack;
    94 };
     94} cpu_t;
    9595
    9696extern cpu_t *cpus;
  • kernel/generic/include/time/timeout.h

    r8dbc18c rf429331  
    3737
    3838#include <arch/types.h>
    39 #include <typedefs.h>
     39#include <cpu.h>
    4040#include <synch/spinlock.h>
    4141#include <adt/list.h>
  • kernel/generic/include/typedefs.h

    r8dbc18c rf429331  
    4848typedef unsigned long context_id_t;
    4949
    50 typedef struct cpu_info cpu_info_t;
    51 
    52 typedef struct cpu cpu_t;
    53 typedef struct cpu_arch cpu_arch_t;
    5450typedef struct task task_t;
    5551typedef enum state state_t;
Note: See TracChangeset for help on using the changeset viewer.