Added chip revision constant
[AROS.git] / rom / dos / getprogramdir.c
blob2f057cf3f9b148beb70d84dc620dfdad953edd37
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: GetProgramDir() - Get the lock for PROGDIR:
6 Lang: english
7 */
8 #include <aros/debug.h>
10 #include "dos_intern.h"
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
16 #include <proto/dos.h>
18 AROS_LH0(BPTR, GetProgramDir,
20 /* SYNOPSIS */
21 /* void */
23 /* LOCATION */
24 struct DosLibrary *, DOSBase, 100, Dos)
26 /* FUNCTION
27 This function will return the shared lock on the directory that
28 the current process was loaded from. You can use this to help
29 you find data files which were supplied with your program.
31 A NULL return is possible, which means that you may be running
32 from the Resident list.
34 You should NOT under any circumstance UnLock() this lock.
36 INPUTS
38 RESULT
39 A shared lock on the directory the program was started from.
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 struct Process *me = (struct Process *)FindTask(NULL);
56 ASSERT_VALID_PROCESS(me);
57 return me->pr_HomeDir;
59 AROS_LIBFUNC_EXIT
60 } /* GetProgramDir */