2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
14 BPTR lockin
= BNULL
, lockout
= BNULL
;
18 char *pathin
, *pathout
= NULL
;
21 TEST( (lockin
= Lock( pathin
, SHARED_LOCK
)) != BNULL
);
22 TEST( chdir( pathin
) == 0 );
23 pathout
= getcwd( NULL
, 0 );
24 TEST( (lockout
= Lock( pathin
, SHARED_LOCK
)) != BNULL
);
25 TEST( SameLock( lockin
, lockout
) == LOCK_SAME
);
26 free( pathout
); pathout
= NULL
;
27 UnLock( lockin
); lockin
= BNULL
;
28 UnLock( lockout
); lockout
= BNULL
;
31 TEST( (lockin
= Lock( pathin
, SHARED_LOCK
)) != BNULL
);
32 TEST( chdir( pathin
) == 0 );
33 pathout
= getcwd( NULL
, 0 );
34 TEST( (lockout
= Lock( pathin
, SHARED_LOCK
)) != BNULL
);
35 TEST( SameLock( lockin
, lockout
) == LOCK_SAME
);
36 free( pathout
); pathout
= NULL
;
37 UnLock( lockin
); lockin
= BNULL
;
38 UnLock( lockout
); lockout
= BNULL
;
45 if ( lockin
!= BNULL
)
47 if ( lockout
!= BNULL
)