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"
21 #if defined(AFS_SUN5_ENV) && defined(KERNEL)
23 #include "../rx/rx_kmutex.h"
26 #include <sys/tiuser.h>
27 #include <sys/t_lock.h>
28 #include <sys/mutex.h>
31 int afs_cv_wait(cv, m, sigok, fileid, line)
35 int afs_cv_wait(cv, m, sigok)
41 int haveGlock = ISAFS_GLOCK();
47 rxdb_droplock(m, osi_ThreadUnique(), fileid, line);
50 if (cv_wait_sig(cv, m) == 0)
56 rxdb_grablock(m, osi_ThreadUnique(), fileid, line);
67 int afs_cv_timedwait(cv, m, t, sigok, fileid, line)
71 int afs_cv_timedwait(cv, m, t, sigok)
78 int haveGlock = ISAFS_GLOCK();
84 rxdb_droplock(m, osi_ThreadUnique(), fileid, line);
87 if (cv_timedwait_sig(cv, m, t) == 0)
90 cv_timedwait(cv, m, t);
93 rxdb_grablock(m, osi_ThreadUnique(), fileid, line);
103 #endif /* SUN5 && KERNEL */