# crt0.c File Reference

`#include <pspkerneltypes.h>`
`#include <pspmoduleinfo.h>`
`#include <pspthreadman.h>`
`#include <stdlib.h>`
`#include <string.h>`

Include dependency graph for crt0.c:

## Data Structures

struct | _library_entry

## Defines

#define | ARG_MAX 19
#define | DEFAULT_THREAD_PRIORITY 32
#define | DEFAULT_THREAD_ATTRIBUTE PSP_THREAD_ATTR_USER
#define | DEFAULT_THREAD_STACK_KB_SIZE 256

## Functions

int sce_newlib_nocreate_thread_in_start | __attribute__ ((weak))
void | _init (void)
void | _fini (void)
int | main (int argc, char *argv[])
void | _main (SceSize args, void *argp)
| Main program thread.
int | _start (SceSize args, void *argp)
| Startup thread.

## Variables

char * | __psp_argv_0 = NULL

## Define Documentation

#define ARG_MAX 19

#define DEFAULT_THREAD_ATTRIBUTE PSP_THREAD_ATTR_USER

#define DEFAULT_THREAD_PRIORITY 32

#define DEFAULT_THREAD_STACK_KB_SIZE 256

## Function Documentation

int sce_newlib_nocreate_thread_in_start __attribute__ | ( | (weak) |  | ) |

void _fini | ( | void |  | ) |

void _init | ( | void |  | ) |

void _main | ( | SceSize | args,
|  | void * | argp
| ) |

Main program thread.

Initializes runtime parameters and calls the program's main().

Parameters:

  | args | - Size (in bytes) of the argp parameter.
  | argp | - Pointer to program arguments. Each argument is a NUL-terminated string.

int _start | ( | SceSize | args,
|  | void * | argp
| ) |

Startup thread.

Creates the main program thread based on variables defined by the program.

Parameters:

  | args | - Size (in bytes) of arguments passed to the program by the kernel.
  | argp | - Pointer to arguments passed by the kernel.

int main | ( | int | argc,
|  | char * | argv[]
| ) |

## Variable Documentation

char* __psp_argv_0 = NULL