mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Unix CM: Fix afs_event fallout on Mac OS X
Commit dc077b83c9
moved the afs_event
structure definition into afs_osi.h. However, afs_osi.h is included from
lots of places which don't include a complete set of platform headers.
This means that the use of lck_mtx_t in this file breaks the build on
Darwin.
Instead, define the structure in afs.h, along with all of the rest of
the cache manager structures. Also take the opportunity to move the
definition of shutdown_osisleep it afs_prototypes.h, with the rest of
the prototypes.
Change-Id: Idd19fc30adcb5ab37e65ad87fa9224668e8cd321
Reviewed-on: http://gerrit.openafs.org/5392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
136704fa64
commit
6d274905b0
@ -1559,4 +1559,32 @@ struct afssysa {
|
||||
extern int Afs_syscall(struct afssysa *uap, rval_t *rvp);
|
||||
#endif /* AFS_SUN5_ENV */
|
||||
|
||||
/* The event hash table, and array */
|
||||
|
||||
typedef struct afs_event {
|
||||
struct afs_event *next; /* next in hash chain */
|
||||
char *event; /* lwp event: an address */
|
||||
int refcount; /* Is it in use? */
|
||||
int seq; /* Sequence number: this is incremented
|
||||
* by wakeup calls; wait will not return until
|
||||
* it changes */
|
||||
#if defined(AFS_AIX_ENV)
|
||||
tid_t cond;
|
||||
#elif defined(AFS_DARWIN_ENV)
|
||||
# ifdef AFS_DARWIN80_ENV
|
||||
lck_mtx_t *lck;
|
||||
thread_t owner;
|
||||
# endif
|
||||
/* 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)
|
||||
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 */
|
||||
#endif
|
||||
} afs_event_t;
|
||||
|
||||
extern afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */
|
||||
|
||||
#endif /* _AFS_H_ */
|
||||
|
@ -17,10 +17,6 @@
|
||||
#include <sys/condvar.h>
|
||||
#endif
|
||||
|
||||
#ifdef AFS_SGI_ENV
|
||||
#include "sys/sema.h" /* for kcondvar_t */
|
||||
#endif
|
||||
|
||||
#ifdef AFS_NBSD_ENV
|
||||
#include <sys/lock.h>
|
||||
#endif
|
||||
@ -133,31 +129,7 @@ struct afs_osi_WaitHandle {
|
||||
* DFBSD and SUNOS have no osi_sleep, and HPUX has its own hack for this stuff
|
||||
*/
|
||||
#define AFS_EVHASHSIZE 128 /* size of afs_evhasht, must be power of 2 */
|
||||
typedef struct afs_event {
|
||||
struct afs_event *next; /* next in hash chain */
|
||||
char *event; /* lwp event: an address */
|
||||
int refcount; /* Is it in use? */
|
||||
int seq; /* Sequence number: this is incremented
|
||||
* by wakeup calls; wait will not return until
|
||||
* it changes */
|
||||
#if defined(AFS_AIX_ENV)
|
||||
tid_t cond;
|
||||
#elif defined(AFS_DARWIN_ENV)
|
||||
#ifdef AFS_DARWIN80_ENV
|
||||
lck_mtx_t *lck;
|
||||
thread_t owner;
|
||||
#endif
|
||||
/* 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)
|
||||
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 */
|
||||
#endif
|
||||
} afs_event_t;
|
||||
extern afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */
|
||||
extern void shutdown_osisleep(void);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
@ -550,6 +550,7 @@ extern void afs_osi_RxkRegister(void);
|
||||
extern void afs_osi_Invisible(void);
|
||||
extern void shutdown_osi(void);
|
||||
extern void shutdown_osinet(void);
|
||||
extern void shutdown_osisleep(void);
|
||||
extern int afs_osi_suser(void *credp);
|
||||
extern void afs_osi_TraverseProcTable(void);
|
||||
#if defined(KERNEL) && !defined(UKERNEL)
|
||||
|
Loading…
Reference in New Issue
Block a user