[OpenAFS-devel] SOLARIS/osi_vnops.c

Frank Batschulat Frank Batschulat <Frank.Batschulat@Sun.COM>
Thu, 5 Jul 2001 10:00:21 +0200 (MEST)


Hi All,

found the following comment & code in SOLARIS/osi_vnops.c
and was wondering what it complains about regarding
Solaris rw_tryupgrade() ?

<snip>
#if     defined(AFS_SUN5_ENV)
/* 
 * XXX Temporary fix for problems with Solaris rw_tryupgrade() lock.
 * It isn't very persistent in getting the upgrade when others are
 * waiting for it and returns 0.  So the UpgradeSToW() macro that the
 * rw_tryupgrade used to map to wasn't good enough and we need to use
 * the following code instead.  Obviously this isn't the proper place
 * for it but it's only called from here for now
 * 
 */
#ifndef AFS_SUN54_ENV
AFS_TRYUP(lock)
     afs_rwlock_t *lock;
{
    if (!rw_tryupgrade(lock)) {
        rw_exit(lock);
        rw_enter(lock, RW_WRITER);
    }
}
#endif
#endif
<snip end>


frankB

----------------------------------------------------------
Frank Batschulat, Solaris Kernel Sustaining & Engineering. 

batschul@eng.sun.com	     (+49 30) 747 096 845 (x65845)              
----------------------------------------------------------