diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-03 12:31:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-03 12:31:19 (GMT) |
commit | b9ecc426358d3737357f0460caee4eae5be61a3a (patch) | |
tree | 1af98744597d706e888e17d56f9a96c61450f14d /win | |
parent | 0d066cf5f9286f6ecb836a4c131cdd3d70b76734 (diff) | |
parent | f2d051b8afa1a1d9acf943607988e4c911ed2d3c (diff) | |
download | tcl-b9ecc426358d3737357f0460caee4eae5be61a3a.zip tcl-b9ecc426358d3737357f0460caee4eae5be61a3a.tar.gz tcl-b9ecc426358d3737357f0460caee4eae5be61a3a.tar.bz2 |
Move cpuid testcase from win-specific to generic tests
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinTest.c | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 34aea42..e493fbf 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -40,8 +40,6 @@ static int TestwinclockCmd(ClientData dummy, Tcl_Interp* interp, static int TestwinsleepCmd(ClientData dummy, Tcl_Interp* interp, int objc, Tcl_Obj *const objv[]); static Tcl_ObjCmdProc TestExceptionCmd; -static int TestwincpuidCmd(ClientData dummy, Tcl_Interp* interp, - int objc, Tcl_Obj *const objv[]); static int TestplatformChmod(const char *nativePath, int pmode); static int TestchmodCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); @@ -76,7 +74,6 @@ TclplatformtestInit( Tcl_CreateObjCommand(interp, "testvolumetype", TestvolumetypeCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testwinclock", TestwinclockCmd, NULL, NULL); - Tcl_CreateObjCommand(interp, "testwincpuid", TestwincpuidCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testwinsleep", TestwinsleepCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testexcept", TestExceptionCmd, NULL, NULL); return TCL_OK; @@ -292,83 +289,6 @@ TestwinclockCmd( return TCL_OK; } -/* - *---------------------------------------------------------------------- - * - * 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, index, i; - unsigned int regs[4]; - Tcl_Obj *regsObjs[4]; - - 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) 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 by - * means of a direct call to Sleep. - * - * Usage: - * testwinsleep <n> - * - * Parameters: - * n - the number of milliseconds to sleep - * - * Results: - * None. - * - * Side effects: - * Sleeps for the requisite number of milliseconds. - * - *---------------------------------------------------------------------- - */ - static int TestwinsleepCmd( ClientData clientData, /* Unused */ |