]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Be type correct in osi_ThreadUnique() for FBSD
authorBen Kaduk <kaduk@mit.edu>
Sat, 6 Mar 2010 19:51:17 +0000 (14:51 -0500)
committerDerrick Brashear <shadow@dementia.org>
Sun, 7 Mar 2010 14:54:29 +0000 (06:54 -0800)
Formerly, in AFS_FBSD50_ENV, we used curproc for the ThreadUnique
value; however, curproc (#defined as curthread->td_proc) is a
struct proc *, not an actual pid.  (As such, it suffers from
a 32/64-bit mismatch on 64-bit systems.)  Use the correct value,
curproc->p_pid, instead.

Change-Id: If07ef3b0814c0fee63b62d2f36fa94d6e45573b9
Reviewed-on: http://gerrit.openafs.org/1528
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs_osi.h

index 5f6588b03122846f3b7414a29e5f5b3637e8bfe4..488334a525857f1efceb84fb51d7e32c12cf8153 100644 (file)
@@ -185,7 +185,7 @@ typedef struct timeval osi_timeval_t;
  */
 #ifdef AFS_FBSD50_ENV
 /* should use curthread, but 'ps' can't display it */
-#define osi_ThreadUnique()     curproc
+#define osi_ThreadUnique()     (curproc->p_pid)
 #elif defined(AFS_LINUX_ENV)
 #define osi_ThreadUnique()     (current->pid)
 #elif defined(UKERNEL)