This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: AmigaOS extensions need no ppport.h since in ext/
[perl5.git] / amigaos4 / amigaio.h
CommitLineData
a83a2cd1
AB
1#ifndef _AMIGAIO_H
2#define _AMIGAIO_H
3
4#include "../perl.h"
5
6struct StdioStore
7{
8 /* astdin...astderr are the amigaos file descriptors */
9 long astdin;
10 long astdout;
11 long astderr;
12 /* oldstdin...oldstderr are the amigados file handles */
13 long oldstdin;
14 long oldstdout;
15 long oldstderr;
16};
17
18typedef struct StdioStore StdioStore;
19
20/* get the amigaos file descriptors */
21void amigaos_stdio_get(pTHX_ StdioStore *store);
22
23/* save the amigados file handles (calls amigaos_stdio_get) */
24void amigaos_stdio_save(pTHX_ StdioStore *store);
25
26/* restore the amigados file handles stored with amigaos_stdio_save */
27void amigaos_stdio_restore(pTHX_ const StdioStore *store);
28
29/* everything the child needs from the parent is in UserData,
30 * then pass it through task->tc_UserData or as arg to new pthread */
31struct UserData
32{
33 struct Task *parent;
34 I32 did_pipes;
35 int pp;
36 SV **sp;
37 SV **mark;
38 PerlInterpreter *my_perl;
39};
40
41void amigaos_fork_set_userdata(
42 pTHX_ struct UserData *userdata, I32 did_pipes, int pp, SV **sp, SV **mark);
43
44void *amigaos_system_child(void *userdata);
45
46void amigaos_post_exec(int fd, int do_report);
47
48Pid_t amigaos_fork();
49Pid_t amigaos_waitpid(pTHX_ int optype, Pid_t pid, void *argflags);
50
51#endif