Skip to contentSkip to conversation

Calling architecture specific headers files?

DISCUSSION Abhishek Bist 1 participant 1 message May 5, 2015

lore
Share & tools
lore
#0 lore raw

Hi,
I am searching the way out that how an architecture specific header's file come into existence.For example the
generic defination of spinlock is supposed to call architecture specific spinlock.

(linux/spinlock_types.h)

	typedef struct raw_spinlock {
          arch_spinlock_t raw_lock;			<<<<
 #ifdef CONFIG_GENERIC_LOCKBREAK
         unsigned int break_lock;
 #endif
 #ifdef CONFIG_DEBUG_SPINLOCK
         unsigned int magic, owner_cpu;
         void *owner;
 #endif
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
         struct lockdep_map dep_map;

#endif
} raw_spinlock_t;

(x86/include/asm/spinlock_types.h)

typedef struct arch_spinlock {
        union {
                __ticketpair_t head_tail;
                struct __raw_tickets {
                       __ticket_t head, tail;
                } tickets;
        };
} arch_spinlock_t;

what is there which makes to load the architecture specific spinlock (x86) in my case.