'\" t
.\" Title: switchtest
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1
.\" Date: 2008/04/19
.\" Manual: Xenomai Manual
.\" Source: Xenomai 2.6.3
.\" Language: English
.\"
.TH "SWITCHTEST" "1" "2008/04/19" "Xenomai 2\&.6\&.3" "Xenomai Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
switchtest \- Xenomai context switch test
.SH "SYNOPSIS"
.sp
\fBswitchtest\fR [options] threadspec threadspec\&...
.SH "DESCRIPTION"
.sp
\fBswitchtest\fR is part of Xenomai\&. It can be used to test thread context switches\&. \fBswitchtest\fR creates threads of various types and attempts to switch context between these threads, printing the count of context switches every second\&. A suitable Xenomai enabled kernel with the respective module (xeno_posix) must be installed\&.
.SH "OPTIONS"
.sp
Each threadspec specifies the characteristics of a thread to be created:
.sp
threadspec = (rtk|rtup|rtus|rtuo)(_fp|_ufpp|_ufps)*[0\-9]*
.PP
\fBrtk\fR
.RS 4
for a kernel\-space real\-time thread
.RE
.PP
\fBrtup\fR
.RS 4
for a user\-space real\-time thread running in primary mode
.RE
.PP
\fBrtus\fR
.RS 4
for a user\-space real\-time thread running in secondary mode
.RE
.PP
\fBrtuo\fR
.RS 4
for a user\-space real\-time thread oscillating between primary and secondary mode
.RE
.PP
\fB_fp\fR
.RS 4
means that the created thread will have the XNFPU bit armed (only valid for rtk)
.RE
.PP
\fB_ufpp\fR
.RS 4
means that the created thread will use the FPU when in primary mode\en(invalid for rtus)
.RE
.PP
\fB_ufps\fR
.RS 4
means that the created thread will use the FPU when in secondary mode (invalid for rtk and rtup)
.RE
.PP
\fB[0\-9]\fR
.RS 4
specifies the ID of the CPU where the created thread will run, 0 if unspecified
.RE
.sp
Passing no \fBthreadspec\fR is equivalent to running:
.sp
switchtest rtkN rtkN rtk_fpN rtk_fpN rtk_fp_ufppN rtk_fp_ufppN rtupN rtupN rtup_ufppN rtup_ufppN rtusN rtusN rtus_ufpsN rtus_ufpsN rtuoN rtuoN rtuo_ufppN rtuo_ufppN rtuo_ufpsN rtuo_ufpsN rtuo_ufpp_ufpsN rtuo_ufpp_ufpsN
.sp
with N=1,\&...,nr_cpus, i\&.e\&. occurrences of all the arguments for each CPU
.sp
Passing only the \-\-nofpu or \-n argument is equivalent to running:
.sp
switchtest rtkN rtkN rtupN rtupN rtusN rtusN rtuoN rtuoN
.sp
similar to the above\&.
.sp
\fBswitchtest\fR accepts the following options:
.PP
\fB\-\-help, \-h\fR
.RS 4
print usage information and exit
.RE
.PP
\fB\-\-lines , \-l \fR
.RS 4
print headers every lines
.RE
.PP
\fB\-\-quiet or \-q\fR
.RS 4
prevent this program from printing every second the count of ncontext switches
.RE
.PP
\fB\-\-timeout , \-T \fR
.RS 4
limit the test duration to seconds
.RE
.PP
\fB\-\-nofpu, \-n\fR
.RS 4
disables any use of FPU instructions
.RE
.SH "AUTHOR"
.sp
\fBswitchtest\fR was written by Philippe Gerum and Gilles Chanteperdrix\&. This man page was written by Roland Stigge\&.