diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-03 11:42:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-03 11:42:31 (GMT) |
commit | f2d051b8afa1a1d9acf943607988e4c911ed2d3c (patch) | |
tree | 0fe7c3557422b4961634ae6cb04385ba56531d6e /win/tclWinTest.c | |
parent | 712d308e92f67f88efc00a5e35e270f8821490a4 (diff) | |
download | tcl-f2d051b8afa1a1d9acf943607988e4c911ed2d3c.zip tcl-f2d051b8afa1a1d9acf943607988e4c911ed2d3c.tar.gz tcl-f2d051b8afa1a1d9acf943607988e4c911ed2d3c.tar.bz2 |
Move cpuid testcase from win-specific to generic tests
Simplify stub tables for functions which work on both UNIX and windows
Diffstat (limited to 'win/tclWinTest.c')
-rw-r--r-- | win/tclWinTest.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/win/tclWinTest.c b/win/tclWinTest.c index dadd067..c59730d 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -44,10 +44,6 @@ static int TestwinsleepCmd _ANSI_ARGS_(( ClientData dummy, int objc, Tcl_Obj *CONST objv[] )); static Tcl_ObjCmdProc TestExceptionCmd; -static int TestwincpuidCmd _ANSI_ARGS_(( ClientData dummy, - Tcl_Interp* interp, - int objc, - Tcl_Obj *CONST objv[] )); static int TestplatformChmod _ANSI_ARGS_((CONST char *nativePath, int pmode)); static int TestchmodCmd _ANSI_ARGS_((ClientData dummy, @@ -87,8 +83,6 @@ TclplatformtestInit(interp) (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateObjCommand(interp, "testwinclock", TestwinclockCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); - Tcl_CreateObjCommand(interp, "testwincpuid", TestwincpuidCmd, - (ClientData) 0, (Tcl_CmdDeleteProc*) NULL ); Tcl_CreateObjCommand(interp, "testwinsleep", TestwinsleepCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL ); Tcl_CreateObjCommand(interp, "testexcept", TestExceptionCmd, @@ -312,62 +306,6 @@ TestwinclockCmd( ClientData dummy, /* *---------------------------------------------------------------------- * - * TestwincpuidCmd -- - * - * Retrieves CPU ID information. - * - * Usage: - * testwincpuid <eax> - * - * Parameters: - * eax - The value to pass in the EAX register to a CPUID instruction. - * - * Results: - * Returns a four-element list containing the values from the - * EAX, EBX, ECX and EDX registers returned from the CPUID instruction. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -TestwincpuidCmd( ClientData dummy, - Tcl_Interp* interp, /* Tcl interpreter */ - int objc, /* Parameter count */ - Tcl_Obj *CONST * objv ) /* Parameter vector */ -{ - int status; - int index; - unsigned int regs[4]; - Tcl_Obj * regsObjs[4]; - int i; - - if ( objc != 2 ) { - Tcl_WrongNumArgs( interp, 1, objv, "eax" ); - return TCL_ERROR; - } - if ( Tcl_GetIntFromObj( interp, objv[1], &index ) != TCL_OK ) { - return TCL_ERROR; - } - status = TclWinCPUID( (unsigned int) index, regs ); - if ( status != TCL_OK ) { - Tcl_SetObjResult( interp, Tcl_NewStringObj( "operation not available", - -1 ) ); - return status; - } - for ( i = 0; i < 4; ++i ) { - regsObjs[i] = Tcl_NewIntObj( (int) regs[i] ); - } - Tcl_SetObjResult( interp, Tcl_NewListObj( 4, regsObjs ) ); - return TCL_OK; - -} - -/* - *---------------------------------------------------------------------- - * * TestwinsleepCmd -- * * Causes this process to wait for the given number of milliseconds |