Blame view

include/linux/spinlock_types_up.h 720 Bytes
fb1c8f93d   Ingo Molnar   [PATCH] spinlock ...
1
2
3
4
5
6
7
8
9
10
11
12
13
  #ifndef __LINUX_SPINLOCK_TYPES_UP_H
  #define __LINUX_SPINLOCK_TYPES_UP_H
  
  #ifndef __LINUX_SPINLOCK_TYPES_H
  # error "please don't include this file directly"
  #endif
  
  /*
   * include/linux/spinlock_types_up.h - spinlock type definitions for UP
   *
   * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
   * Released under the General Public License (GPL).
   */
21f8ca3bf   Peter Zijlstra   fix raw_spinlock_...
14
  #ifdef CONFIG_DEBUG_SPINLOCK
fb1c8f93d   Ingo Molnar   [PATCH] spinlock ...
15
16
17
18
19
20
21
22
  
  typedef struct {
  	volatile unsigned int slock;
  } raw_spinlock_t;
  
  #define __RAW_SPIN_LOCK_UNLOCKED { 1 }
  
  #else
fb1c8f93d   Ingo Molnar   [PATCH] spinlock ...
23
24
25
  typedef struct { } raw_spinlock_t;
  
  #define __RAW_SPIN_LOCK_UNLOCKED { }
fb1c8f93d   Ingo Molnar   [PATCH] spinlock ...
26
27
  
  #endif
fb1c8f93d   Ingo Molnar   [PATCH] spinlock ...
28
29
30
31
32
  typedef struct {
  	/* no debug version on UP */
  } raw_rwlock_t;
  
  #define __RAW_RW_LOCK_UNLOCKED { }
fb1c8f93d   Ingo Molnar   [PATCH] spinlock ...
33
34
  
  #endif /* __LINUX_SPINLOCK_TYPES_UP_H */