예제 #1
0
static void MainL()
{
  log_clear(PRIMARY_LOG_FILENAME);
  log_text(PRIMARY_LOG_FILENAME, "initializing");
  logg("value is %d", 555);
  log_ctx(PRIMARY_LOG_FILENAME, "context test");

  // Note that if our program does not run for at least five seconds
  // or so, the S60 auto launch mechanism will consider that an error,
  // and this may result in some error dialog popping up. We use
  // WaitWhile() to avoid that sort of thing where an intrusive error
  // report is not called for. Calling WaitWhile will hopefully also
  // ensure that the system is somewhat up and running even right after
  // boot, so that there are no problems with querying the installed
  // apps information or anything like that.
  WaitWhile();

  RFs fs;
  User::LeaveIfError(fs.Connect());
  CleanupClosePushL(fs);

  TBool magicFileExists = MagicFileExists(fs);
  if (!magicFileExists) {
    TBool isAppInstalled = IsAppInstalledL();
    if (isAppInstalled) {
      MainLoopL();
    } else {
      logt("program to launch not installed");
    }
  } else {
    logt("magic file exists");
  }

  CleanupStack::PopAndDestroy(); // fs
}
예제 #2
0
파일: sched.c 프로젝트: FoXPeeD/OS-bwis
asmlinkage void schedule(void)
{
	/* ... */

/*switch_tasks:
	prefetch(next);
	clear_tsk_need_resched(prev);*/

    /* hw2 ctx log */
    log_ctx(prev, next);
    
	/* if (likely(prev != next)) ... */

	/* ... */
}