]>
Commit | Line | Data |
---|---|---|
273d56ce | 1 | /* Data from initial program startup for running under the GNU Hurd. |
c84142e8 UD |
2 | Copyright (C) 1995, 1997 Free Software Foundation, Inc. |
3 | This file is part of the GNU C Library. | |
273d56ce | 4 | |
c84142e8 UD |
5 | The GNU C Library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public License as | |
7 | published by the Free Software Foundation; either version 2 of the | |
8 | License, or (at your option) any later version. | |
273d56ce | 9 | |
c84142e8 UD |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Library General Public License for more details. | |
273d56ce | 14 | |
c84142e8 UD |
15 | You should have received a copy of the GNU Library General Public |
16 | License along with the GNU C Library; see the file COPYING.LIB. If not, | |
17 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
18 | Boston, MA 02111-1307, USA. */ | |
273d56ce RM |
19 | |
20 | #ifndef _HURDSTARTUP_H | |
21 | #define _HURDSTARTUP_H 1 | |
22 | ||
23 | ||
24 | /* Interesting data saved from the exec_startup reply. | |
25 | The DATA argument to *MAIN (see below) points to: | |
26 | ||
27 | int argc; | |
28 | char *argv[argc]; | |
29 | char *argv_terminator = NULL; | |
30 | char *envp[?]; | |
31 | char *envp_terminator = NULL; | |
32 | struct hurd_startup_data data; | |
33 | ||
c84142e8 | 34 | */ |
273d56ce RM |
35 | |
36 | struct hurd_startup_data | |
37 | { | |
38 | int flags; | |
39 | mach_port_t *dtable; | |
40 | mach_msg_type_number_t dtablesize; | |
41 | mach_port_t *portarray; | |
42 | mach_msg_type_number_t portarraysize; | |
43 | int *intarray; | |
44 | mach_msg_type_number_t intarraysize; | |
45 | vm_address_t stack_base; | |
46 | vm_size_t stack_size; | |
47 | vm_address_t phdr; | |
48 | vm_size_t phdrsz; | |
49 | vm_address_t user_entry; | |
50 | }; | |
51 | ||
52 | ||
53 | /* Initialize Mach RPCs; do initial handshake with the exec server (or | |
54 | extract the arguments from the stack in the case of the bootstrap task); | |
55 | finally, call *MAIN with the information gleaned. That function is not | |
56 | expected to return. ARGPTR should be the address of the first argument | |
57 | of the entry point function that is called with the stack exactly as the | |
58 | exec server or kernel sets it. */ | |
59 | ||
60 | extern void _hurd_startup (void **argptr, void (*main) (int *data)); | |
61 | ||
62 | ||
63 | #endif /* hurdstartup.h */ |