pthread pid casting
authorDerrick Brashear <shadow@dementia.org>
Wed, 21 Oct 2009 18:42:23 +0000 (14:42 -0400)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 22 Oct 2009 14:20:09 +0000 (07:20 -0700)
in rx, we use pthread_self (which can return a pointer) as a pid;
in order to not cause problems, cast it as we do elsewhere

Reviewed-on: http://gerrit.openafs.org/703
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/rx/rx.c

index 84da17e..48e724d 100755 (executable)
@@ -763,7 +763,7 @@ rx_StartServer(int donateMe)
        static int nProcs;
 #ifdef AFS_PTHREAD_ENV
        pid_t pid;
-       pid = (pid_t) pthread_self();
+       pid = afs_pointer_to_int(pthread_self());
 #else /* AFS_PTHREAD_ENV */
        PROCESS pid;
        LWP_CurrentProcess(&pid);