[Haskell-cafe] Announce: Package rdtsc for reading IA-32 time stamp counters

Donald Bruce Stewart dons at cse.unsw.edu.au
Wed Jan 3 02:06:27 EST 2007


magr:
> Hallo all,
> 
> version 1.0 of package rdtsc has just been released.
> 

Very nice.

I've attached some small patches:
    a) to move the src into System.CPUTime.Rdtsc (more intuitive space)
    b) move C src into cbits dir (standard name)

Good work,
    Don
-------------- next part --------------

New patches:

[update cabal file
Don Stewart <dons at cse.unsw.edu.au>**20070103070147] {
hunk ./rdtsc.cabal 1
-Name:           rdtsc
-Version:        1.0
-License:        GPL
-License-file:   COPYING
-Author:         Martin Grabmueller <magr at cs.tu-berlin.de>
-Maintainer:     magr at cs.tu-berlin.de
-Homepage:       http://uebb.cs.tu-berlin.de/~magr/projects/rdtsc/
-Category:       Timing, Profiling
-Synopsis:       Binding for the rdtsc machine instruction
-Description:	This module provides the function 'rdtsc' for accessing
+Name:               rdtsc
+Version:            1.0
+License:            GPL
+License-file:       COPYING
+Author:             Martin Grabmueller <magr at cs.tu-berlin.de>
+Maintainer:         magr at cs.tu-berlin.de
+Homepage:           http://uebb.cs.tu-berlin.de/~magr/projects/rdtsc/
+Category:           Timing, Profiling
+Synopsis:           Binding for the rdtsc machine instruction
+Description:	    This module provides the function 'rdtsc' for accessing
hunk ./rdtsc.cabal 22
-Stability:      Experimental
-Build-depends:  base
-Exposed-Modules: Rdtsc.Rdtsc
-Extensions:     ForeignFunctionInterface
-C-sources:	Rdtsc/rdtsc.c
-Include-dirs:   Rdtsc
-Install-includes: rdtsc.h
+Stability:          Experimental
+Build-depends:      base
+Exposed-Modules:    System.CPUTime.Rdtsc
+Extensions:         ForeignFunctionInterface
+C-sources:	        cbits/rdtsc.c
+Include-dirs:       cbits
+Install-includes:   rdtsc.h
+ghc-options:        -O -Wall -Werror
}

[Move C code into standard cbits/ dir, and .hs code under System.CPUTime
Don Stewart <dons at cse.unsw.edu.au>**20070103070159] {
adddir ./System
adddir ./System/CPUTime
move ./Rdtsc/Rdtsc.hs ./System/CPUTime/Rdtsc.hs
adddir ./cbits
move ./Rdtsc/rdtsc.c ./cbits/rdtsc.c
move ./Rdtsc/rdtsc.h ./cbits/rdtsc.h
rmdir ./Rdtsc
hunk ./System/CPUTime/Rdtsc.hs 3
--- Module:     Rdtsc.Rdtsc
+-- Module:     System.CPUTime.Rdtsc
hunk ./System/CPUTime/Rdtsc.hs 27
-module Rdtsc.Rdtsc(rdtsc) where
+module System.CPUTime.Rdtsc(rdtsc) where
}

[And update tests
Don Stewart <dons at cse.unsw.edu.au>**20070103070333] {
hunk ./tests/Makefile 2
-GHCFLAGS=-fglasgow-exts -i../..
+GHCFLAGS=-O -fglasgow-exts -i../..
hunk ./tests/Makefile 13
-	$(CC) $(CFLAGS) -o $@ -I../Rdtsc test_rdtsc.c rdtsc.o
+	$(CC) $(CFLAGS) -o $@ -I../cbits test_rdtsc.c rdtsc.o
hunk ./tests/Makefile 15
-rdtsc.o: ../Rdtsc/rdtsc.c ../Rdtsc/rdtsc.h
-	$(CC) $(CFLAGS) -c -I../Rdtsc $<
+rdtsc.o: ../cbits/rdtsc.c ../cbits/rdtsc.h
+	$(CC) $(CFLAGS) -c -I../cbits $<
hunk ./tests/TestRdtsc.hs 3
-import Rdtsc.Rdtsc
+import System.CPUTime.Rdtsc
}

Context:

[TAG rdtsc 1.0
Martin Grabmueller <magr at cs.tu-berlin.de>**20070102134714] 
Patch bundle hash:
d553b3c78207e6bb4968f3eee8eb94641875c768


More information about the Haskell-Cafe mailing list