オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /trunk/1.7.x/ccs-patch/security/ccsecurity/compat.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2540 by kumaneko, Thu May 14 00:08:32 2009 UTC revision 2690 by kumaneko, Wed Jun 24 04:50:19 2009 UTC
# Line 5  Line 5 
5   *   *
6   * Copyright (C) 2005-2009  NTT DATA CORPORATION   * Copyright (C) 2005-2009  NTT DATA CORPORATION
7   *   *
8   * Version: 1.6.8-pre   2009/05/08   * Version: 1.6.8   2009/05/28
9   *   *
10   * This file is applicable to both 2.4.30 and 2.6.11 and later.   * This file is applicable to both 2.4.30 and 2.6.11 and later.
11   * See README.ccs for ChangeLog.   * See README.ccs for ChangeLog.
# Line 83  Line 83 
83                          ret; })                          ret; })
84  #endif  #endif
85    
86  /*  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
87  #ifndef list_for_each  #define smp_read_barrier_depends smp_rmb
 #define list_for_each(pos, head) \  
         for (pos = (head)->next; prefetch(pos->next), pos != (head); \  
              pos = pos->next)  
88  #endif  #endif
89    
90  #ifndef list_for_each_entry  #ifndef ACCESS_ONCE
91  #define list_for_each_entry(pos, head, member) \  #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
92          for (pos = list_entry((head)->next, typeof(*pos), member); \  #endif
93    
94    #ifndef rcu_dereference
95    #define rcu_dereference(p)     ({ \
96                                    typeof(p) _________p1 = ACCESS_ONCE(p); \
97                                    smp_read_barrier_depends(); /* see RCU */ \
98                                    (_________p1); \
99                                    })
100    #endif
101    
102    #ifndef rcu_assign_pointer
103    #define rcu_assign_pointer(p, v) \
104            ({ \
105                    if (!__builtin_constant_p(v) || \
106                        ((v) != NULL)) \
107                            smp_wmb(); /* see RCU */ \
108                    (p) = (v); \
109            })
110    #endif
111    
112    #ifndef list_for_each_rcu
113    #define list_for_each_rcu(pos, head) \
114            for (pos = rcu_dereference((head)->next); \
115                    prefetch(pos->next), pos != (head); \
116                    pos = rcu_dereference(pos->next))
117    #endif
118    
119    #ifndef list_for_each_entry_rcu
120    #define list_for_each_entry_rcu(pos, head, member) \
121            for (pos = list_entry(rcu_dereference((head)->next), typeof(*pos), \
122                    member); \
123                  prefetch(pos->member.next), &pos->member != (head); \                  prefetch(pos->member.next), &pos->member != (head); \
124                  pos = list_entry(pos->member.next, typeof(*pos), member))                  pos = list_entry(rcu_dereference(pos->member.next), \
125                    typeof(*pos), member))
126  #endif  #endif
 */  
127    
128  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)  #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
129  #define s_fs_info u.generic_sbp  #define s_fs_info u.generic_sbp

Legend:
Removed from v.2540  
changed lines
  Added in v.2690

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26