summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-03-01 17:51:15 +0100
committerJohn Kacur <jkacur@redhat.com>2010-03-01 20:43:25 +0100
commit6214410e57d8be054ee58ecdc53cbc4803a3627b (patch)
treee53cc80e543d7ff35ab65ba3cce4b152c575bd92
parentd2b6363c8b396dca09f9f61a171c39195411c043 (diff)
downloadrt-tests-6214410e57d8be054ee58ecdc53cbc4803a3627b.tar.gz
rename pip to pip_stress as pip is too general
The command name is already taken by a perl script working with CPAN and a Python package installer. While at it remove trailing whitespace from three lines in src/pi_tests/pip_stress.c. Closes: http://bugs.debian.org/572104 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--.gitignore2
-rw-r--r--Makefile4
-rw-r--r--src/include/pip_stress.h (renamed from src/include/pip.h)7
-rw-r--r--src/pi_tests/pip_stress.c (renamed from src/pi_tests/pip.c)10
4 files changed, 11 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index a06031c..0d77a66 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,4 +23,4 @@ ptsematest
sendme
sigwaittest
svsematest
-pip
+pip_stress
diff --git a/Makefile b/Makefile
index 5bb8774..52f8d64 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
VERSION_STRING = 0.66
sources = cyclictest.c signaltest.c pi_stress.c rt-migrate-test.c \
- ptsematest.c sigwaittest.c svsematest.c sendme.c pip.c
+ ptsematest.c sigwaittest.c svsematest.c sendme.c pip_stress.c
TARGETS = $(sources:.c=)
@@ -79,7 +79,7 @@ svsematest: svsematest.o rt-utils.o rt-get_cpu.o
sendme: sendme.o rt-utils.o rt-get_cpu.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
-pip: pip.o error.o rt-utils.o
+pip_stress: pip_stress.o error.o rt-utils.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
CLEANUP = $(TARGETS) *.o .depend *.*~ *.orig *.rej rt-tests.spec *.d
diff --git a/src/include/pip.h b/src/include/pip_stress.h
index b2068be..8ed2452 100644
--- a/src/include/pip.h
+++ b/src/include/pip_stress.h
@@ -1,5 +1,5 @@
-#ifndef __PIP_H
-#define __PIP_H
+#ifndef __PIP_STRESS_H
+#define __PIP_STRESS_H
#include <stdio.h>
#include <stdlib.h>
@@ -37,5 +37,4 @@ int get_rt_prio(pid_t pid);
#define PROTRW PROT_READ|PROT_WRITE
#define MMAP_FLAGS MAP_SHARED|MAP_ANONYMOUS
-#endif /* __PIP_H */
-
+#endif /* __PIP_STRESS_H */
diff --git a/src/pi_tests/pip.c b/src/pi_tests/pip_stress.c
index 085908b..2b42b8f 100644
--- a/src/pi_tests/pip.c
+++ b/src/pi_tests/pip_stress.c
@@ -1,6 +1,6 @@
/*
- Pip - Priority Inheritance with processes
-
+ Pip stress - Priority Inheritance with processes
+
Copyright (C) 2009, John Kacur <jkacur@redhat.com>
This program is free software: you can redistribute it and/or modify
@@ -54,7 +54,7 @@
* scheduling priorities.
*/
-#include "pip.h"
+#include "pip_stress.h"
pthread_mutex_t *resource;
@@ -107,7 +107,7 @@ int main(void)
set_rt_prio(0, prio_min, policy);
/* We restrict this program to the first cpu, inorder to increase
- * the likelihood of a priority inversion */
+ * the likelihood of a priority inversion */
CPU_ZERO(setp);
CPU_SET(0, setp);
res = sched_setaffinity(0, sizeof(set), setp);
@@ -311,7 +311,7 @@ void init_shared_pthread_mutex(pthread_mutex_t *mutex, int protocol, int policy)
Pthread_mutexattr_init(&attr);
Pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
Pthread_mutexattr_setprotocol(&attr, protocol);
-
+
Pthread_mutex_init(mutex, &attr);
}