aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pan/pan.c16
-rw-r--r--pan/tag_report.c10
-rw-r--r--testcases/kernel/ipc/pipeio/pipeio.c12
-rw-r--r--testcases/misc/math/fptests/fptest01.c24
-rw-r--r--tools/netpipe-2.4-ipv6/netpipe.c28
-rw-r--r--tools/netpipe-2.4/netpipe.c28
6 files changed, 59 insertions, 59 deletions
diff --git a/pan/pan.c b/pan/pan.c
index c4b5f7250..78e46e61d 100644
--- a/pan/pan.c
+++ b/pan/pan.c
@@ -45,7 +45,7 @@
* 01/29/03 - Added: Manoj Iyer, manjo@mail.utexas.edu
* - added code supresses test start and test end tags.
*/
-/* $Id: pan.c,v 1.23 2006/07/10 15:46:10 mreed10 Exp $ */
+/* $Id: pan.c,v 1.24 2006/12/13 22:55:21 vapier Exp $ */
#include <errno.h>
#include <string.h>
@@ -81,7 +81,7 @@ struct tag_pgrp
{
int pgrp;
int stopping;
- time_t stime;
+ time_t mystime;
struct coll_entry *cmd;
char output[PATH_MAX];
};
@@ -699,8 +699,8 @@ check_pids(struct tag_pgrp *running, int *num_active, int keep_active,
if (!fmt_print)
fprintf(logfile,
"tag=%s stime=%d dur=%d exit=%s stat=%d core=%s cu=%d cs=%d\n",
- running[i].cmd->name, (int) (running[i].stime),
- (int) (t - running[i].stime), status, w,
+ running[i].cmd->name, (int) (running[i].mystime),
+ (int) (t - running[i].mystime), status, w,
(stat_loc & 0200) ? "yes" : "no",
(int) (tms2.tms_cutime - tms1.tms_cutime),
(int) (tms2.tms_cstime - tms1.tms_cstime));
@@ -893,7 +893,7 @@ run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode)
if (colle->pcnt_f) free(c_cmdline);
close(errpipe[1]);
- time(&active->stime);
+ time(&active->mystime);
active->cmd = colle;
/* if the child couldn't go through with the exec,
@@ -955,7 +955,7 @@ run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode)
if (Debug & Dstartup)
fprintf(stderr, "started %s cpid=%d at %s",
- colle->name, cpid, ctime(&active->stime));
+ colle->name, cpid, ctime(&active->mystime));
if (Debug & Dstart) {
fprintf(stderr, "Executing test = %s as %s", colle->name, colle->cmdline);
@@ -1184,7 +1184,7 @@ write_test_start(struct tag_pgrp *running, const char *init_status)
printf("%s\ntag=%s stime=%ld\ncmdline=\"%s\"\ncontacts=\"%s\"\nanalysis=%s\ninitiation_status=\"%s\"\n%s\n",
"<<<test_start>>>",
- running->cmd->name, running->stime, running->cmd->cmdline, "",
+ running->cmd->name, running->mystime, running->cmd->cmdline, "",
"exit", init_status,
"<<<test_output>>>");
}
@@ -1200,7 +1200,7 @@ write_test_end(struct tag_pgrp *running, time_t exit_time,
if (!strcmp(reporttype, "rts")) {
printf("%s\nduration=%ld termination_type=%s termination_id=%d corefile=%s\ncutime=%d cstime=%d\n%s\n",
"<<<execution_status>>>",
- (long) (exit_time - running->stime),
+ (long) (exit_time - running->mystime),
term_type, term_id, (stat_loc & 0200) ? "yes" : "no",
(int) (tms2->tms_cutime - tms1->tms_cutime),
(int) (tms2->tms_cstime - tms1->tms_cstime),
diff --git a/pan/tag_report.c b/pan/tag_report.c
index de4515c60..0389e715d 100644
--- a/pan/tag_report.c
+++ b/pan/tag_report.c
@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*
*/
-/* $Id: tag_report.c,v 1.1 2000/09/21 21:35:06 alaffin Exp $ */
+/* $Id: tag_report.c,v 1.2 2006/12/13 22:55:22 vapier Exp $ */
#include "tag_report.h"
#include "debug.h"
#include "reporter.h"
@@ -239,7 +239,7 @@ tag_report(alltags, ctag, keys)
/* retrieved _keys values: initation status, start time, duration,
* termination type, termination id, start line, end line. */
- char *tag, *contact, *is, *stime, *duration, *tt, *ti, *sl, *el;
+ char *tag, *contact, *is, *mystime, *duration, *tt, *ti, *sl, *el;
/* Check all driver-level status first */
strcpy(key_get, "tag");
@@ -361,12 +361,12 @@ tag_report(alltags, ctag, keys)
}
strcpy(key_get, "stime");
- if((stime = (char *)sym_get(keys, key_get)) == NULL) {
- stime = "No_stime";
+ if((mystime = (char *)sym_get(keys, key_get)) == NULL) {
+ mystime = "No_stime";
}
printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n",
- tag, "!", "!", is, contact, stime, duration,
+ tag, "!", "!", is, contact, mystime, duration,
ti, tt, sl, el);
}
diff --git a/testcases/kernel/ipc/pipeio/pipeio.c b/testcases/kernel/ipc/pipeio/pipeio.c
index 7d44da5f2..39fa505cd 100644
--- a/testcases/kernel/ipc/pipeio/pipeio.c
+++ b/testcases/kernel/ipc/pipeio/pipeio.c
@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*
*/
-/* $Header: /cvsroot/ltp/ltp/testcases/kernel/ipc/pipeio/pipeio.c,v 1.10 2006/06/22 04:28:33 vapier Exp $ */
+/* $Header: /cvsroot/ltp/ltp/testcases/kernel/ipc/pipeio/pipeio.c,v 1.11 2006/12/13 22:55:22 vapier Exp $ */
/*
* This tool can be used to beat on system or named pipes.
* See the help() function below for user information.
@@ -139,7 +139,7 @@ char *av[];
int read_fd = 0;
int write_fd = 0;
int empty_read = 0; /* counter for the number of empty reads */
- time_t stime, ctime, dtime; /* start time, current time, diff of times */
+ time_t start_time, current_time, diff_time; /* start time, current time, diff of times */
int *count_word; /* holds address where to write writers count */
int *pid_word; /* holds address where to write writers pid */
int format;
@@ -467,7 +467,7 @@ char *av[];
pipe_type = PIPE_NAMED;
}
- stime=time(0);
+ start_time=time(0);
#if DEBUG
printf("num_wrters = %d\n", num_wrters);
@@ -636,10 +636,10 @@ printf("child after fork pid = %d\n", getpid());
}
}
if (verbose || (num_rpt && !(count % num_rpt))) {
- ctime = time(0);
- dtime = ctime - stime; /* elapsed time */
+ current_time = time(0);
+ diff_time = current_time - start_time; /* elapsed time */
tst_resm (TFAIL, "(%d) rd# %d, sz= %d, %s %s empty_reads= %d, err= %d\n",
- (int)dtime,count,size,pipe_type,blk_type,empty_read,error);
+ (int)diff_time,count,size,pipe_type,blk_type,empty_read,error);
fflush(stdout);
}
}
diff --git a/testcases/misc/math/fptests/fptest01.c b/testcases/misc/math/fptests/fptest01.c
index 80e32b225..d479c9b27 100644
--- a/testcases/misc/math/fptests/fptest01.c
+++ b/testcases/misc/math/fptests/fptest01.c
@@ -84,7 +84,7 @@ struct event eventtab[EVENTMX];
struct event rtrevent;
int waiting[EVENTMX]; /* array of waiting processors */
int nwaiting; /* number of waiting processors */
-double stime; /* global clock */
+double global_time; /* global clock */
double lsttime; /* time used for editing */
double dtc, dts, alpha; /* timing parameters */
int nproc; /* number of processors */
@@ -133,7 +133,7 @@ init()
double dtw, dtwsig;
ncycle=0;
- stime=0;
+ global_time=0;
lsttime=0;
barcnt=0;
nwaiting=0;
@@ -148,7 +148,7 @@ init()
}
for (p=1; p<=nproc; p++) {
- addevent(ENTERWORK,p,stime);
+ addevent(ENTERWORK,p,global_time);
}
return(0);
@@ -167,7 +167,7 @@ term()
for (i=0; i < nproc; i++)
t_total += eventtab[i].time;
- avgspd=ncycle/stime;
+ avgspd=ncycle/global_time;
v = t_total - MAGIC1;
if (v < 0.0)
@@ -294,33 +294,33 @@ struct event *ev;
double nxttime;
int i, p, proc;
- stime = ev->time;
+ global_time = ev->time;
proc = ev->proc;
switch (ev->type) {
case TRYCRIT :
if (critfree==TRUE)
- addevent(ENTERCRIT,proc,stime);
+ addevent(ENTERCRIT,proc,global_time);
else
addwaiting(proc);
break;
case ENTERCRIT :
critfree = FALSE;
- nxttime=stime+dtcrit();
+ nxttime=global_time+dtcrit();
addevent(LEAVECRIT,proc,nxttime);
break;
case LEAVECRIT :
critfree = TRUE;
- addevent(ATBARRIER,proc,stime);
+ addevent(ATBARRIER,proc,global_time);
if ((p=getwaiting())!=0) {
- nxttime=stime;
+ nxttime=global_time;
addevent(ENTERCRIT,p,nxttime);
}
break;
case ATBARRIER :
barcnt++;
if (barcnt==nproc) {
- nxttime=stime;
+ nxttime=global_time;
for (i=1; i<=nproc; i++) {
nxttime+=dtspinoff();
addevent(ENTERWORK,i,nxttime);
@@ -330,12 +330,12 @@ struct event *ev;
}
break;
case ENTERWORK :
- nxttime=stime+dtwork();
+ nxttime=global_time+dtwork();
if (ncycle<ncycmax)
addevent(LEAVEWORK,proc,nxttime);
break;
case LEAVEWORK :
- addevent(TRYCRIT,proc,stime);
+ addevent(TRYCRIT,proc,global_time);
break;
default:
tst_resm(TBROK,"Illegal event");
diff --git a/tools/netpipe-2.4-ipv6/netpipe.c b/tools/netpipe-2.4-ipv6/netpipe.c
index 3b1d7786f..246ba8d6c 100644
--- a/tools/netpipe-2.4-ipv6/netpipe.c
+++ b/tools/netpipe-2.4-ipv6/netpipe.c
@@ -97,8 +97,8 @@ int main(int argc, char *argv[])
short port=DEFPORT; /* Port number for connection */
#ifdef HAVE_GETRUSAGE
struct rusage prev_rusage, curr_rusage; /* Resource usage */
- double utime, stime; /* User & system time used */
- double best_utime, best_stime; /* Total user & system time used */
+ double user_time, sys_time; /* User & system time used */
+ double best_user_time, best_sys_time; /* Total user & system time used */
double ut1, ut2, st1, st2; /* User & system time ctrs for variance */
double ut_var, st_var; /* Variance in user & system time */
#endif
@@ -387,7 +387,7 @@ int main(int argc, char *argv[])
t2 = t1 = 0;
#ifdef HAVE_GETRUSAGE
ut1 = ut2 = st1 = st2 = 0.0;
- best_utime = best_stime = LONGTIME;
+ best_user_time = best_sys_time = LONGTIME;
#endif
for (i = 0; i < TRIALS; i++)
{
@@ -411,24 +411,24 @@ int main(int argc, char *argv[])
t = (When() - t0)/((1 + !streamopt) * nrepeat);
#ifdef HAVE_GETRUSAGE
getrusage(RUSAGE_SELF, &curr_rusage);
- utime = ((curr_rusage.ru_utime.tv_sec -
+ user_time = ((curr_rusage.ru_utime.tv_sec -
prev_rusage.ru_utime.tv_sec) + (double)
(curr_rusage.ru_utime.tv_usec -
prev_rusage.ru_utime.tv_usec) * 1.0E-6) /
((1 + !streamopt) * nrepeat);
- stime = ((curr_rusage.ru_stime.tv_sec -
+ sys_time = ((curr_rusage.ru_stime.tv_sec -
prev_rusage.ru_stime.tv_sec) + (double)
(curr_rusage.ru_stime.tv_usec -
prev_rusage.ru_stime.tv_usec) * 1.0E-6) /
((1 + !streamopt) * nrepeat);
- ut2 += utime * utime;
- st2 += stime * stime;
- ut1 += utime;
- st1 += stime;
- if ((utime + stime) < (best_utime + best_stime))
+ ut2 += user_time * user_time;
+ st2 += sys_time * sys_time;
+ ut1 += user_time;
+ st1 += sys_time;
+ if ((user_time + sys_time) < (best_user_time + best_sys_time))
{
- best_utime = utime;
- best_stime = stime;
+ best_user_time = user_time;
+ best_sys_time = sys_time;
}
#endif
@@ -527,8 +527,8 @@ int main(int argc, char *argv[])
fprintf(stderr, ", avg utime=%.7f avg stime=%.7f, ",
ut1 / (double) TRIALS,
st1 / (double) TRIALS);
- fprintf(stderr, "min utime=%.7f stime=%.7f, ", best_utime,
- best_stime);
+ fprintf(stderr, "min utime=%.7f stime=%.7f, ", best_user_time,
+ best_sys_time);
fprintf(stderr, "utime var=%.7f stime var=%.7f", ut_var, st_var);
#endif
fprintf(stderr, "\n");
diff --git a/tools/netpipe-2.4/netpipe.c b/tools/netpipe-2.4/netpipe.c
index 801a3dee2..0fee78287 100644
--- a/tools/netpipe-2.4/netpipe.c
+++ b/tools/netpipe-2.4/netpipe.c
@@ -59,8 +59,8 @@ main(int argc, char *argv[])
short port=DEFPORT; /* Port number for connection */
#ifdef HAVE_GETRUSAGE
struct rusage prev_rusage, curr_rusage; /* Resource usage */
- double utime, stime; /* User & system time used */
- double best_utime, best_stime; /* Total user & system time used */
+ double user_time, sys_time; /* User & system time used */
+ double best_user_time, best_sys_time; /* Total user & system time used */
double ut1, ut2, st1, st2; /* User & system time ctrs for variance */
double ut_var, st_var; /* Variance in user & system time */
#endif
@@ -334,7 +334,7 @@ main(int argc, char *argv[])
t2 = t1 = 0;
#ifdef HAVE_GETRUSAGE
ut1 = ut2 = st1 = st2 = 0.0;
- best_utime = best_stime = LONGTIME;
+ best_user_time = best_sys_time = LONGTIME;
#endif
for (i = 0; i < TRIALS; i++)
{
@@ -358,24 +358,24 @@ main(int argc, char *argv[])
t = (When() - t0)/((1 + !streamopt) * nrepeat);
#ifdef HAVE_GETRUSAGE
getrusage(RUSAGE_SELF, &curr_rusage);
- utime = ((curr_rusage.ru_utime.tv_sec -
+ user_time = ((curr_rusage.ru_utime.tv_sec -
prev_rusage.ru_utime.tv_sec) + (double)
(curr_rusage.ru_utime.tv_usec -
prev_rusage.ru_utime.tv_usec) * 1.0E-6) /
((1 + !streamopt) * nrepeat);
- stime = ((curr_rusage.ru_stime.tv_sec -
+ sys_time = ((curr_rusage.ru_stime.tv_sec -
prev_rusage.ru_stime.tv_sec) + (double)
(curr_rusage.ru_stime.tv_usec -
prev_rusage.ru_stime.tv_usec) * 1.0E-6) /
((1 + !streamopt) * nrepeat);
- ut2 += utime * utime;
- st2 += stime * stime;
- ut1 += utime;
- st1 += stime;
- if ((utime + stime) < (best_utime + best_stime))
+ ut2 += user_time * user_time;
+ st2 += sys_time * sys_time;
+ ut1 += user_time;
+ st1 += sys_time;
+ if ((user_time + sys_time) < (best_user_time + best_sys_time))
{
- best_utime = utime;
- best_stime = stime;
+ best_user_time = user_time;
+ best_sys_time = sys_time;
}
#endif
@@ -474,8 +474,8 @@ main(int argc, char *argv[])
fprintf(stderr, ", avg utime=%.7f avg stime=%.7f, ",
ut1 / (double) TRIALS,
st1 / (double) TRIALS);
- fprintf(stderr, "min utime=%.7f stime=%.7f, ", best_utime,
- best_stime);
+ fprintf(stderr, "min utime=%.7f stime=%.7f, ", best_user_time,
+ best_sys_time);
fprintf(stderr, "utime var=%.7f stime var=%.7f", ut_var, st_var);
#endif
fprintf(stderr, "\n");