use old style synchronization barrier. It might be that we will need a separate file...
[AROS.git] / rom / dos / samedevice.c
blobf5e61904dda903a0ee69fffc5b3407a098749bd9
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "dos_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <proto/dos.h>
15 AROS_LH2(BOOL, SameDevice,
17 /* SYNOPSIS */
18 AROS_LHA(BPTR, lock1, D1),
19 AROS_LHA(BPTR, lock2, D2),
21 /* LOCATION */
22 struct DosLibrary *, DOSBase, 164, Dos)
24 /* FUNCTION
25 Checks if two locks are on the same device.
27 INPUTS
28 lock1, lock2 - locks to compare
30 RESULT
31 DOSTRUE when locks are on the same device
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 *****************************************************************************/
45 AROS_LIBFUNC_INIT
47 struct FileLock *fl1, *fl2;
49 if (lock1 == BNULL || lock2 == BNULL)
50 return DOSFALSE;
52 fl1 = (struct FileLock *)BADDR(lock1);
53 fl2 = (struct FileLock *)BADDR(lock2);
55 if (fl1->fl_Volume == fl2->fl_Volume && fl1->fl_Task == fl2->fl_Task)
56 return DOSTRUE;
58 return DOSFALSE;
60 AROS_LIBFUNC_EXIT
61 } /* SameDevice */