"Fossies" - the Fresh Open Source Software Archive

Member "UXP-2019.06.08/other-licenses/7zstub/src/CPP/Windows/System.h" (8 Jun 2019, 818 Bytes) of package /linux/www/UXP-2019.06.08.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // Windows/System.h
    2 
    3 #ifndef __WINDOWS_SYSTEM_H
    4 #define __WINDOWS_SYSTEM_H
    5 
    6 #include "../Common/MyTypes.h"
    7 
    8 namespace NWindows {
    9 namespace NSystem {
   10 
   11 UInt32 CountAffinity(DWORD_PTR mask);
   12 
   13 struct CProcessAffinity
   14 {
   15   // UInt32 numProcessThreads;
   16   // UInt32 numSysThreads;
   17   DWORD_PTR processAffinityMask;
   18   DWORD_PTR systemAffinityMask;
   19 
   20   void InitST()
   21   {
   22     // numProcessThreads = 1;
   23     // numSysThreads = 1;
   24     processAffinityMask = 1;
   25     systemAffinityMask = 1;
   26   }
   27 
   28   UInt32 GetNumProcessThreads() const { return CountAffinity(processAffinityMask); }
   29   UInt32 GetNumSystemThreads() const { return CountAffinity(systemAffinityMask); }
   30 
   31   BOOL Get();
   32 };
   33 
   34 UInt32 GetNumberOfProcessors();
   35 
   36 bool GetRamSize(UInt64 &size); // returns false, if unknown ram size
   37 
   38 }}
   39 
   40 #endif