Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  rtla.c

  Sprache: C
 

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2021 Red Hat Inc, Daniel Bristot de Oliveira <bristot@kernel.org>
 */


#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#include "osnoise.h"
#include "timerlat.h"

/*
 * rtla_usage - print rtla usage
 */

static void rtla_usage(int err)
{
 int i;

 static const char *msg[] = {
  "",
  "rtla version " VERSION,
  "",
  "  usage: rtla COMMAND ...",
  "",
  "  commands:",
  "     osnoise  - gives information about the operating system noise (osnoise)",
  "     hwnoise  - gives information about hardware-related noise",
  "     timerlat - measures the timer irq and thread latency",
  "",
  NULL,
 };

 for (i = 0; msg[i]; i++)
  fprintf(stderr, "%s\n", msg[i]);
 exit(err);
}

/*
 * run_command - try to run a rtla tool command
 *
 * It returns 0 if it fails. The tool's main will generally not
 * return as they should call exit().
 */

int run_command(int argc, char **argv, int start_position)
{
 if (strcmp(argv[start_position], "osnoise") == 0) {
  osnoise_main(argc-start_position, &argv[start_position]);
  goto ran;
 } else if (strcmp(argv[start_position], "hwnoise") == 0) {
  hwnoise_main(argc-start_position, &argv[start_position]);
  goto ran;
 } else if (strcmp(argv[start_position], "timerlat") == 0) {
  timerlat_main(argc-start_position, &argv[start_position]);
  goto ran;
 }

 return 0;
ran:
 return 1;
}

int main(int argc, char *argv[])
{
 int retval;

 /* is it an alias? */
 retval = run_command(argc, argv, 0);
 if (retval)
  exit(0);

 if (argc < 2)
  goto usage;

 if (strcmp(argv[1], "-h") == 0) {
  rtla_usage(0);
 } else if (strcmp(argv[1], "--help") == 0) {
  rtla_usage(0);
 }

 retval = run_command(argc, argv, 1);
 if (retval)
  exit(0);

usage:
 rtla_usage(1);
 exit(1);
}

Messung V0.5 in Prozent
C=94 H=90 G=91

¤ Dauer der Verarbeitung: 0.25 Sekunden  (vorverarbeitet am  2026-06-07) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002