mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 07:51:00 +00:00
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:
parent
17be9b775c
commit
236c18b36a
@ -1582,7 +1582,7 @@ typedef struct afs_event {
|
|||||||
/* no cond member */
|
/* no cond member */
|
||||||
#elif defined(AFS_FBSD_ENV) || defined(AFS_OBSD_ENV)
|
#elif defined(AFS_FBSD_ENV) || defined(AFS_OBSD_ENV)
|
||||||
int cond; /* "all this gluck should probably be replaced by CVs" */
|
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;
|
wait_queue_head_t cond;
|
||||||
#elif defined(AFS_NBSD_ENV) || defined(AFS_SOLARIS_ENV) || defined(AFS_SGI_ENV)
|
#elif defined(AFS_NBSD_ENV) || defined(AFS_SOLARIS_ENV) || defined(AFS_SGI_ENV)
|
||||||
kcondvar_t cond; /* Currently associated condition variable */
|
kcondvar_t cond; /* Currently associated condition variable */
|
||||||
|
@ -272,7 +272,7 @@ shutdown_osi(void)
|
|||||||
afs_osi_ctxtp_initialized = 0;
|
afs_osi_ctxtp_initialized = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#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 */
|
/* LINUX calls this from afs_cleanup() which hooks into module_exit */
|
||||||
shutdown_osisleep();
|
shutdown_osisleep();
|
||||||
#endif
|
#endif
|
||||||
@ -301,9 +301,9 @@ shutdown_osisleep(void)
|
|||||||
afs_osi_Free(tmp, sizeof(*tmp));
|
afs_osi_Free(tmp, sizeof(*tmp));
|
||||||
#elif defined(AFS_SGI_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_SOLARIS_ENV)
|
#elif defined(AFS_SGI_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_SOLARIS_ENV)
|
||||||
osi_FreeSmallSpace(tmp);
|
osi_FreeSmallSpace(tmp);
|
||||||
#elif defined(AFS_LINUX_ENV)
|
#elif defined(AFS_LINUX26_ENV)
|
||||||
kfree(tmp);
|
kfree(tmp);
|
||||||
#elif defined(AFS_LINUX24_ENV)
|
#elif defined(AFS_LINUX20_ENV)
|
||||||
osi_linux_free(tmp);
|
osi_linux_free(tmp);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -205,8 +205,6 @@ typedef struct timeval osi_timeval32_t;
|
|||||||
#ifdef AFS_FBSD_ENV
|
#ifdef AFS_FBSD_ENV
|
||||||
/* should use curthread, but 'ps' can't display it */
|
/* should use curthread, but 'ps' can't display it */
|
||||||
#define osi_ThreadUnique() (curproc->p_pid)
|
#define osi_ThreadUnique() (curproc->p_pid)
|
||||||
#elif defined(AFS_LINUX_ENV)
|
|
||||||
#define osi_ThreadUnique() (current->pid)
|
|
||||||
#elif defined(UKERNEL)
|
#elif defined(UKERNEL)
|
||||||
#define osi_ThreadUnique() osi_getpid()
|
#define osi_ThreadUnique() osi_getpid()
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user