Back to index

glibc  2.9
hurdstartup.h
Go to the documentation of this file.
00001 /* Data from initial program startup for running under the GNU Hurd.
00002    Copyright (C) 1995,97,2002 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _HURDSTARTUP_H
00021 #define _HURDSTARTUP_H 1
00022 
00023 # include <stdint.h>
00024 
00025 /* Interesting data saved from the exec_startup reply.
00026    The DATA argument to *MAIN (see below) points to:
00027 
00028     int argc;
00029     char *argv[argc];
00030     char *argv_terminator = NULL;
00031     char *envp[?];
00032     char *envp_terminator = NULL;
00033     struct hurd_startup_data data;
00034 
00035 */
00036 
00037 struct hurd_startup_data
00038   {
00039     int flags;
00040     mach_port_t *dtable;
00041     mach_msg_type_number_t dtablesize;
00042     mach_port_t *portarray;
00043     mach_msg_type_number_t portarraysize;
00044     int *intarray;
00045     mach_msg_type_number_t intarraysize;
00046     vm_address_t stack_base;
00047     vm_size_t stack_size;
00048     vm_address_t phdr;
00049     vm_size_t phdrsz;
00050     vm_address_t user_entry;
00051   };
00052 
00053 
00054 /* Initialize Mach RPCs; do initial handshake with the exec server (or
00055    extract the arguments from the stack in the case of the bootstrap task);
00056    finally, call *MAIN with the information gleaned.  That function is not
00057    expected to return.  ARGPTR should be the address of the first argument
00058    of the entry point function that is called with the stack exactly as the
00059    exec server or kernel sets it.  */
00060 
00061 extern void _hurd_startup (void **argptr, void (*main) (intptr_t *data));
00062 
00063 
00064 #endif /* hurdstartup.h */