start service tasks separately in-case platforms need to perform additional set-up...
[AROS.git] / rom / dos / internalloadseg.h
blobaf45ef930543e9ad2738293960b7f38fdbfe2b97
1 #ifndef INTERNALLOADSEG_H
2 #define INTERNALLOADSEG_H
4 BPTR InternalLoadSeg_AOS(BPTR file,
5 BPTR table,
6 SIPTR * funcarray,
7 LONG * stacksize,
8 struct DosLibrary * DOSBase);
10 BPTR InternalLoadSeg_ELF(BPTR file,
11 BPTR hunk_table,
12 SIPTR * funcarray,
13 LONG * stacksize,
14 struct DosLibrary * DOSBase);
16 int read_block(BPTR file, APTR buffer, ULONG size, SIPTR * funcarray, struct DosLibrary * DOSBase);
18 /* AllocVec() simulation using allocation function from the supplied array */
19 APTR _ilsAllocVec(SIPTR *funcarray, ULONG size, ULONG flags);
20 void _ilsFreeVec(SIPTR *funcarray, void *buf);
22 #define ilsAllocVec(size, flags) _ilsAllocVec(funcarray, size, flags)
23 #define ilsFreeVec(ptr) _ilsFreeVec(funcarray, ptr)
25 #define ilsRead(file, buf, size) \
26 AROS_UFC4 \
27 ( \
28 LONG, (APTR)(funcarray[0]), \
29 AROS_UFCA(BPTR, file, D1), \
30 AROS_UFCA(void *, buf, D2), \
31 AROS_UFCA(LONG, size, D3), \
32 AROS_UFCA(struct DosLibrary *, DOSBase, A6) \
35 #define ilsAllocMem(size, flags) \
36 AROS_UFC3 \
37 ( \
38 void *, (APTR)(funcarray[1]),\
39 AROS_UFCA(ULONG, size, D0), \
40 AROS_UFCA(ULONG, flags, D1), \
41 AROS_UFCA(struct ExecBase *, SysBase, A6) \
44 #define ilsFreeMem(addr, size) \
45 AROS_UFC3NR \
46 ( \
47 void, (APTR)(funcarray[2]), \
48 AROS_UFCA(void *, addr, A1), \
49 AROS_UFCA(ULONG, size, D0), \
50 AROS_UFCA(struct ExecBase *, SysBase, A6) \
53 #define ilsSeek(file, pos, mode) \
54 AROS_UFC4 \
55 ( \
56 LONG, (APTR)(funcarray[3]), \
57 AROS_UFCA(BPTR, file, D1), \
58 AROS_UFCA(LONG, pos, D2), \
59 AROS_UFCA(LONG, mode, D3), \
60 AROS_UFCA(struct DosLibrary *, DOSBase, A6) \
63 #endif