Exemplo n.º 1
0
void
arch_init(void)
{
  setlocale(LC_ALL, "");
  concurrency = get_system_concurrency();
  decorate_trace = isatty(2);

  TRACE(TRACE_INFO, "core", "Using %d CPU(s)", concurrency);

#ifdef RLIMIT_AS
  do {
    struct rlimit rlim;
    getrlimit(RLIMIT_AS, &rlim);
    rlim.rlim_cur = 512 * 1024 * 1024;
    setrlimit(RLIMIT_AS, &rlim);
  } while(0);
#endif

#ifdef RLIMIT_DATA
  do {
    struct rlimit rlim;
    getrlimit(RLIMIT_DATA, &rlim);
    rlim.rlim_cur = 512 * 1024 * 1024;
    setrlimit(RLIMIT_DATA, &rlim);
  } while(0);
#endif

  net_initialize();

  if(trace_to_syslog)
    openlog("showtime", 0, LOG_USER);
}
Exemplo n.º 2
0
void
linux_init(void)
{
  get_device_id();
  linux_trap_init();
  gconf.concurrency = get_system_concurrency();
}
Exemplo n.º 3
0
/**
 * Linux main
 */
int
main(int argc, char **argv)
{
  gconf.binary = argv[0];

  posix_init();

#if ENABLE_GU
  extern void gu_init(int *argc, char ***argv);
  gu_init(&argc, &argv);
#endif

  parse_opts(argc, argv);

  gconf.concurrency = get_system_concurrency();

  trap_init();

  showtime_init();

  linux_init_monitors();

#if ENABLE_GU
  if(gconf.ui && !strcmp(gconf.ui, "gu")) {
    extern void gu_start(void);
    gu_start();
  } else
#endif
 {
  extern void glw_x11_start(void);
  glw_x11_start();
 }

  showtime_fini();

  arch_exit();
}