Linux: Remove use of undefined AFS_LINUX_ENV

AFS_LINUX_ENV is used in a few places, mostly from commit dc077b83,
but it is not defined anywhere.  As a result the logic was not as
intended.

In the definition of osi_ThreadUnique, this means that on all
Linux we use getpid(), which is OK as it gets defined appropriately
under LINUX and LINUX24 as current->pid or current->tgid.

Change-Id: Ic8daf10480a91ff8406cd6ca3929a2ecfafa78ad
Reviewed-on: http://gerrit.openafs.org/5424
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Marc Dionne 2011-09-14 17:16:52 -04:00 committed by Derrick Brashear
parent 17be9b775c
commit 236c18b36a
3 changed files with 4 additions and 6 deletions

View File

@ -1582,7 +1582,7 @@ typedef struct afs_event {
/* no cond member */
#elif defined(AFS_FBSD_ENV) || defined(AFS_OBSD_ENV)
int cond; /* "all this gluck should probably be replaced by CVs" */
#elif defined(AFS_LINUX_ENV) || defined(AFS_LINUX24_ENV)
#elif defined(AFS_LINUX24_ENV)
wait_queue_head_t cond;
#elif defined(AFS_NBSD_ENV) || defined(AFS_SOLARIS_ENV) || defined(AFS_SGI_ENV)
kcondvar_t cond; /* Currently associated condition variable */

View File

@ -272,7 +272,7 @@ shutdown_osi(void)
afs_osi_ctxtp_initialized = 0;
}
#endif
#if !defined(AFS_HPUX_ENV) && !defined(UKERNEL) && !defined(AFS_DFBSD_ENV) && !defined(AFS_LINUX_ENV)
#if !defined(AFS_HPUX_ENV) && !defined(UKERNEL) && !defined(AFS_DFBSD_ENV) && !defined(AFS_LINUX26_ENV)
/* LINUX calls this from afs_cleanup() which hooks into module_exit */
shutdown_osisleep();
#endif
@ -301,9 +301,9 @@ shutdown_osisleep(void)
afs_osi_Free(tmp, sizeof(*tmp));
#elif defined(AFS_SGI_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_SOLARIS_ENV)
osi_FreeSmallSpace(tmp);
#elif defined(AFS_LINUX_ENV)
#elif defined(AFS_LINUX26_ENV)
kfree(tmp);
#elif defined(AFS_LINUX24_ENV)
#elif defined(AFS_LINUX20_ENV)
osi_linux_free(tmp);
#endif
}

View File

@ -205,8 +205,6 @@ typedef struct timeval osi_timeval32_t;
#ifdef AFS_FBSD_ENV
/* should use curthread, but 'ps' can't display it */
#define osi_ThreadUnique() (curproc->p_pid)
#elif defined(AFS_LINUX_ENV)
#define osi_ThreadUnique() (current->pid)
#elif defined(UKERNEL)
#define osi_ThreadUnique() osi_getpid()
#else