diff options
author | Andy Broad <andy@broad.ology.org.uk> | 2015-08-19 10:01:39 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2015-09-05 11:12:43 -0400 |
commit | a83a2cd160a98d16a60ee6d26a258a3e2bd61429 (patch) | |
tree | 2a93df0d5c93902f2d9e01d8ae7b53736f8ae185 /amigaos4/amigaio.h | |
parent | 218f8ee698859922a48120560577b709375ad149 (diff) | |
download | perl-a83a2cd160a98d16a60ee6d26a258a3e2bd61429.tar.gz |
amigaos4: add amigaos the glue code
amigaos.c: pure amigaos code
amigaio.c: bridge code between perl and amigaos
Diffstat (limited to 'amigaos4/amigaio.h')
-rw-r--r-- | amigaos4/amigaio.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/amigaos4/amigaio.h b/amigaos4/amigaio.h new file mode 100644 index 0000000000..03a64d8888 --- /dev/null +++ b/amigaos4/amigaio.h @@ -0,0 +1,51 @@ +#ifndef _AMIGAIO_H +#define _AMIGAIO_H + +#include "../perl.h" + +struct StdioStore +{ + /* astdin...astderr are the amigaos file descriptors */ + long astdin; + long astdout; + long astderr; + /* oldstdin...oldstderr are the amigados file handles */ + long oldstdin; + long oldstdout; + long oldstderr; +}; + +typedef struct StdioStore StdioStore; + +/* get the amigaos file descriptors */ +void amigaos_stdio_get(pTHX_ StdioStore *store); + +/* save the amigados file handles (calls amigaos_stdio_get) */ +void amigaos_stdio_save(pTHX_ StdioStore *store); + +/* restore the amigados file handles stored with amigaos_stdio_save */ +void amigaos_stdio_restore(pTHX_ const StdioStore *store); + +/* everything the child needs from the parent is in UserData, + * then pass it through task->tc_UserData or as arg to new pthread */ +struct UserData +{ + struct Task *parent; + I32 did_pipes; + int pp; + SV **sp; + SV **mark; + PerlInterpreter *my_perl; +}; + +void amigaos_fork_set_userdata( + pTHX_ struct UserData *userdata, I32 did_pipes, int pp, SV **sp, SV **mark); + +void *amigaos_system_child(void *userdata); + +void amigaos_post_exec(int fd, int do_report); + +Pid_t amigaos_fork(); +Pid_t amigaos_waitpid(pTHX_ int optype, Pid_t pid, void *argflags); + +#endif |