Jump to content

DosEstimateFreqCPU: Difference between revisions

From EDM2
Created page with "==Description== This software is a dynalink library that estimates clock frequency of all available CPUs on 32bit OS/2 environment. It can be used any 32bit development suite..."
 
Ak120 (talk | contribs)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Description==
This software is a dynalink library that estimates clock frequency of all available CPUs on 32-bit OS/2 environment.
This software is a dynalink library that estimates clock frequency of all available CPUs on 32bit OS/2 environment.


It can be used any 32bit development suites that can issue OS/2 APIs such as emx/gcc, VisualAge C/C++ or Watcom C/C++.
It can be used any 32-bit development suites that can issue OS/2 APIs such as emx/gcc, VisualAge C++ or Watcom C/C++.


==Download==
==Function call==
* [http://hobbes.nmsu.edu/h-viewer.php?dir=/pub/os2/dev/dll&file=freqcpu_r111.zip 1.1.1 (build 4) - October 31st,2001]
Estimates clock frequency of all available CPUs.


==Functions==
===Syntax===
* [[OS2_API:DosEstimateFreqCPU|DosEstimateFreqCPU]]
<PRE>
#define INCL_BASE
#include <os2.h>
#include "FREQCPU.h"
APIRET ulrc = DosEstimateFreqCPU(PCPUFREQUENCY pxCPUFrequency);
</PRE>
 
===Parameters===
;pxCPUFrequency (PCPUFREQUENCY) - output: Pointer to structure that estimated clock frequencies will be set to.
 
===Return Code===
; ulrc (APIRET) - return:Return codes.
:!NO_ERROR Error.
:NO_ERROR Successful completion.
 
===Remarks===
This function estimates clock frequency of all available CPUs. Obtained frequency will be set to CPUFREQUENCY structure:
<PRE>
/* CPU frequency information structure */
typedef struct _CPUFREQUENCY
{
    ULONG ulNumCPUs;            /* # of available CPUs */
    FIXED afxFrequencyMHz[64];  /* frequency of each CPUs in FIXED MHz (65536 means 1.0) */
} CPUFREQUENCY, * PCPUFREQUENCY;
</PRE>


==License==
==License==
* GNU LGPL
*GNU LGPL
*Author: Takayuki 'January June' Suwa / Beliefia Productions


==Author==
==Links==
* Takayuki 'January June' Suwa / Beliefia Productions.
*[freqcpu_r111.zip] (2001-10-31)


[[Category:Tools]]
[[Category:C Libraries]]

Latest revision as of 21:05, 25 July 2023

This software is a dynalink library that estimates clock frequency of all available CPUs on 32-bit OS/2 environment.

It can be used any 32-bit development suites that can issue OS/2 APIs such as emx/gcc, VisualAge C++ or Watcom C/C++.

Function call

Estimates clock frequency of all available CPUs.

Syntax

#define INCL_BASE
#include <os2.h>
#include "FREQCPU.h"
 
APIRET ulrc = DosEstimateFreqCPU(PCPUFREQUENCY pxCPUFrequency);

Parameters

pxCPUFrequency (PCPUFREQUENCY) - output
Pointer to structure that estimated clock frequencies will be set to.

Return Code

ulrc (APIRET) - return
Return codes.
!NO_ERROR Error.
NO_ERROR Successful completion.

Remarks

This function estimates clock frequency of all available CPUs. Obtained frequency will be set to CPUFREQUENCY structure:

/* CPU frequency information structure */
typedef struct _CPUFREQUENCY
{
    ULONG ulNumCPUs;            /* # of available CPUs */
    FIXED afxFrequencyMHz[64];  /* frequency of each CPUs in FIXED MHz (65536 means 1.0) */
} CPUFREQUENCY, * PCPUFREQUENCY;

License

  • GNU LGPL
  • Author: Takayuki 'January June' Suwa / Beliefia Productions

Links

  • [freqcpu_r111.zip] (2001-10-31)