~ubuntu-branches/ubuntu/feisty/openafs/feisty

« back to all changes in this revision

Viewing changes to src/afs/lock.h

  • Committer: Package Import Robot
  • Author(s): Russ Allbery
  • Date: 2007-03-26 18:56:55 UTC
  • Revision ID: package-import@ubuntu.com-20070326185655-osce8n0y0dptgurh
* New upstream release.  (Closes: #415699)
  - Support newer Linux kernels.  (Closes: #409797, #410120)
  - Add aklog fallbacks for null realms to support the referral
    capability in MIT Kerberos 1.6 and later.  (Closes: #410314)
* Apply patch from Thomas Sesselmann to support setting options to pass
  to bosserver in /etc/default/openafs-fileserver.  (Closes: #409357)
* Remove the rx_Init calls in the PAM module.  The internal counters
  that had to be initialized that way have been removed.
* Now that we're running regen.sh as part of the build process, only
  patch the Autoconf source files and not the generated output to make
  the diff easier to audit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
#define BEGINMAC do {
87
87
#define ENDMAC   } while (0)
88
88
 
89
 
#if defined(AFS_SUN5_ENV) || defined(AFS_OBSD_ENV)
 
89
#if defined(AFS_SUN57_ENV)
 
90
typedef kthread_t * afs_lock_tracker_t;
 
91
#define MyPidxx (curthread)
 
92
#define MyPidxx2Pid(x) (x ? ttoproc(x)->p_pid : 0)
 
93
#elif defined(AFS_SUN5_ENV) || defined(AFS_OBSD_ENV)
 
94
typedef unsigned int afs_lock_tracker_t;
90
95
#define MyPidxx (curproc->p_pid)
 
96
#define MyPidxx2Pid(x) (x)
91
97
#else
92
98
#if defined(AFS_AIX41_ENV)
 
99
typedef tid_t afs_lock_tracker_t;
93
100
extern tid_t thread_self();
94
 
#define MyPidxx thread_self()
 
101
#define MyPidxx (thread_self())
 
102
#define MyPidxx2Pid(x) ((afs_int32)(x))
95
103
#else /* AFS_AIX41_ENV */
96
104
#if defined(AFS_HPUX101_ENV)
97
 
#define MyPidxx ((int)p_pid(u.u_procp))
 
105
typedef struct proc * afs_lock_tracker_t;
 
106
#define MyPidxx (u.u_procp)
 
107
#define MyPidxx2Pid(x) (x ? (afs_int32)p_pid(x) : 0)
98
108
#else
99
109
#if defined(AFS_SGI64_ENV)
100
110
#if defined(AFS_SGI65_ENV)
 
111
typedef unsigned int afs_lock_tracker_t;
101
112
#define MyPidxx proc_pid(curproc())
 
113
#define MyPidxx2Pid(x) (x)
102
114
#else
 
115
typedef unsigned int afs_lock_tracker_t;
103
116
#define MyPidxx current_pid()
 
117
#define MyPidxx2Pid(x) (x)
104
118
#endif
105
119
#else /* AFS_SGI64_ENV */
106
120
#ifdef AFS_LINUX20_ENV
107
 
#define MyPidxx current->pid
 
121
typedef struct task_struct * afs_lock_tracker_t;
 
122
#define MyPidxx (current)
 
123
#define MyPidxx2Pid(x) (x? (x)->pid : 0)
108
124
#else
109
125
#if defined(AFS_DARWIN_ENV)
110
126
#if defined(AFS_DARWIN80_ENV)
 
127
typedef unsigned int afs_lock_tracker_t;
111
128
#define MyPidxx (proc_selfpid())
 
129
#define MyPidxx2Pid(x) (x)
112
130
#else
 
131
typedef unsigned int afs_lock_tracker_t;
113
132
#define MyPidxx (current_proc()->p_pid )
 
133
#define MyPidxx2Pid(x) (x)
114
134
#endif
115
135
#else
116
136
#if defined(AFS_FBSD_ENV)
 
137
typedef unsigned int afs_lock_tracker_t;
117
138
#define MyPidxx (curproc->p_pid )
 
139
#define MyPidxx2Pid(x) (x)
118
140
#else
 
141
typedef unsigned int afs_lock_tracker_t;
119
142
#define MyPidxx (u.u_procp->p_pid )
 
143
#define MyPidxx2Pid(x) (x)
120
144
#endif /* AFS_FBSD_ENV */
121
145
#endif /* AFS_DARWIN_ENV */
122
146
#endif /* AFS_LINUX20_ENV */
139
163
     ** only for writes/shared  locks. Hence, it indictes where in the
140
164
     ** source code the shared/write lock was set.
141
165
     */
142
 
    unsigned int pid_last_reader;       /* proceess id of last reader */
143
 
    unsigned int pid_writer;    /* process id of writer, else 0 */
 
166
    afs_lock_tracker_t pid_last_reader; /* proceess id of last reader */
 
167
    afs_lock_tracker_t pid_writer;      /* process id of writer, else 0 */
144
168
    unsigned int src_indicator; /* third param to ObtainLock() */
145
169
#endif                          /* INSTRUMENT_LOCKS */
146
170
};