2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 * rx_kmutex.c - mutex and condition variable macros for kernel environment.
13 * Solaris implementation.
16 #include <afsconfig.h>
17 #include "afs/param.h"
20 #if defined(AFS_SUN5_ENV) && defined(KERNEL)
22 #include "rx/rx_kcommon.h"
23 #include "rx_kmutex.h"
24 #include "rx/rx_kernel.h"
27 #include <sys/tiuser.h>
28 #include <sys/t_lock.h>
29 #include <sys/mutex.h>
33 afs_cv_wait(cv
, m
, sigok
, fileid
, line
)
38 afs_cv_wait(cv
, m
, sigok
)
44 int haveGlock
= ISAFS_GLOCK();
50 rxdb_droplock(m
, osi_ThreadUnique(), fileid
, line
);
53 if (cv_wait_sig(cv
, m
) == 0)
59 rxdb_grablock(m
, osi_ThreadUnique(), fileid
, line
);
71 afs_cv_timedwait(cv
, m
, t
, sigok
, fileid
, line
)
76 afs_cv_timedwait(cv
, m
, t
, sigok
)
83 int haveGlock
= ISAFS_GLOCK();
89 rxdb_droplock(m
, osi_ThreadUnique(), fileid
, line
);
92 if (cv_timedwait_sig(cv
, m
, t
) == 0)
95 cv_timedwait(cv
, m
, t
);
98 rxdb_grablock(m
, osi_ThreadUnique(), fileid
, line
);
108 #endif /* SUN5 && KERNEL */