Beispiel #1
0
/*
 * exit. without it the user program cannot terminate correctly.
 */
void zrt_zcall_enhanced_exit(int status){
    ZRT_LOG(L_SHORT, "status %d exiting...", status);
    get_fstab_observer()->mount_export(HANDLE_ONLY_FSTAB_SECTION);
    zvm_exit(status); /*get controls into zerovm*/
    /* unreachable code*/
    return; 
}
Beispiel #2
0
void _start (uint32_t *info)
{
  int argc = info[2];
  char **argv = (void *) &info[3];

  /*
   * command line (with the program name) and environment
   * available via /dev/nvram channel. it can be read from
   * argv/envp, however the support will be removed soon
   */

  /* put marker to the bottom of the stack */
  *(uint64_t*)0xFF000000 = 0x716f74726f622764LLU;

  /* initialize zerovm library */
  _init();

  /* call the user main and exit to zerovm */
  zvm_exit(main(argc, argv, NULL));
}