Add hourglass 1.0.0, a real-time application useful to learn how

CPU scheduling works.

PR:		64635
Submitted by:	Olivier Tharan
Approved by:	pav (mentor).
This commit is contained in:
Thierry Thomas 2004-04-12 15:54:55 +00:00
parent 27f77699fc
commit 5c000ea5a2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=106816
6 changed files with 104 additions and 0 deletions

View file

@ -159,6 +159,7 @@
SUBDIR += gupsc
SUBDIR += hammerhead
SUBDIR += healthd
SUBDIR += hourglass
SUBDIR += httplog
SUBDIR += idled
SUBDIR += installwatch

View file

@ -0,0 +1,45 @@
# New ports collection makefile for: hourglass
# Date created: 23 March 2004
# Whom: olive
#
# $FreeBSD$
#
PORTNAME= hourglass
PORTVERSION= 1.0.0
CATEGORIES= sysutils parallel
MASTER_SITES= http://www.cs.utah.edu/~regehr/hourglass/
MAINTAINER= olive@oban.frmug.org
COMMENT= A real-time application useful to learn how CPU scheduling works
RUN_DEPENDS= jgraph:${PORTSDIR}/graphics/jgraph
USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
PLIST_FILES= bin/busy bin/hourglass
PORTDOCS= CALIBRATION
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 500035
LIB_DEPENDS+= lthread.3:${PORTSDIR}/devel/linuxthreads
.else
LIB_DEPENDS+= lthread.2:${PORTSDIR}/devel/linuxthreads
.endif
post-patch:
@${REINPLACE_CMD} -e 's,%LOCALBASE%,${LOCALBASE},g' \
${WRKSRC}/configure
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
. for doc in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
. endfor
.endif
.include <bsd.port.post.mk>

View file

@ -0,0 +1,2 @@
MD5 (hourglass-1.0.0.tar.gz) = a282877889bddd3307e7ef7674f32415
SIZE (hourglass-1.0.0.tar.gz) = 112374

View file

@ -0,0 +1,31 @@
--- configure.orig Thu Oct 9 20:19:54 2003
+++ configure Mon Apr 12 16:14:58 2004
@@ -3114,7 +3114,6 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@@ -3161,7 +3160,6 @@
#define HAVE_LIBPTHREAD 1
_ACEOF
- LIBS="-lpthread $LIBS"
fi
@@ -3994,8 +3992,10 @@
on_unix='yes' ;
on_windows='no' ;;
*freebsd*)
- LDFLAGS='-llthread -llgcc_r -L/usr/local/lib' ;
- CFLAGS='-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads' ;
+ CFLAGS_sav=$CFLAGS ;
+ LDFLAGS_sav=$LDFLAGS ;
+ LDFLAGS="$LDFLAGS_sav -llthread -llgcc_r -L%LOCALBASE%/lib" ;
+ CFLAGS="$CFLAGS_sav -D_THREAD_SAFE -I%LOCALBASE%/include/pthread/linuxthreads" ;
on_unix='yes' ;
on_windows='no' ;;
*cygwin*)

View file

@ -0,0 +1,11 @@
--- src/Makefile.in.orig Mon Apr 12 09:27:10 2004
+++ src/Makefile.in Mon Apr 12 09:28:02 2004
@@ -188,7 +188,7 @@
AM_CFLAGS = -Wall -Wshadow -Wpointer-arith \
-Wcast-qual -Wcast-align -Wwrite-strings -Wconversion \
-Waggregate-return -Wstrict-prototypes \
- -Wmissing-prototypes -g -O3 \
+ -Wmissing-prototypes -g \
$(CMU_RK_INCLUDES) $(TS_RK_INCLUDES) $(HRTIMERS_INCLUDES) \
$(HLS_INCLUDES) $(RTCTIMERS_INCLUDES)

View file

@ -0,0 +1,14 @@
This is a port of hourglass, a synthetic real-time application that
can be used to learn how CPU scheduling in a general-purpose operating
system works at microsecond and millisecond granularities.
- It creates very detailed map of when each Hourglass thread has
access to the CPU
- It supports multiple thread execution models; e.g. periodic and
CPU-bound
- It acts as an abstraction layer for threading, timing, and CPU
scheduling functionality on Unix- and Win32-based systems
WWW: http://www.cs.utah.edu/~regehr/hourglass/