diff options
Diffstat (limited to '')
-rw-r--r-- | CPP/Windows/System.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/CPP/Windows/System.h b/CPP/Windows/System.h index 23cb0da..0650007 100644 --- a/CPP/Windows/System.h +++ b/CPP/Windows/System.h | |||
@@ -1,7 +1,7 @@ | |||
1 | // Windows/System.h | 1 | // Windows/System.h |
2 | 2 | ||
3 | #ifndef __WINDOWS_SYSTEM_H | 3 | #ifndef ZIP7_INC_WINDOWS_SYSTEM_H |
4 | #define __WINDOWS_SYSTEM_H | 4 | #define ZIP7_INC_WINDOWS_SYSTEM_H |
5 | 5 | ||
6 | #ifndef _WIN32 | 6 | #ifndef _WIN32 |
7 | // #include <sched.h> | 7 | // #include <sched.h> |
@@ -9,11 +9,11 @@ | |||
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | #include "../Common/MyTypes.h" | 11 | #include "../Common/MyTypes.h" |
12 | #include "../Common/MyWindows.h" | ||
12 | 13 | ||
13 | namespace NWindows { | 14 | namespace NWindows { |
14 | namespace NSystem { | 15 | namespace NSystem { |
15 | 16 | ||
16 | |||
17 | #ifdef _WIN32 | 17 | #ifdef _WIN32 |
18 | 18 | ||
19 | UInt32 CountAffinity(DWORD_PTR mask); | 19 | UInt32 CountAffinity(DWORD_PTR mask); |
@@ -64,7 +64,7 @@ struct CProcessAffinity | |||
64 | UInt32 GetNumSystemThreads() const { return (UInt32)numSysThreads; } | 64 | UInt32 GetNumSystemThreads() const { return (UInt32)numSysThreads; } |
65 | BOOL Get(); | 65 | BOOL Get(); |
66 | 66 | ||
67 | #ifdef _7ZIP_AFFINITY_SUPPORTED | 67 | #ifdef Z7_AFFINITY_SUPPORTED |
68 | 68 | ||
69 | CCpuSet cpu_set; | 69 | CCpuSet cpu_set; |
70 | 70 | ||
@@ -86,7 +86,7 @@ struct CProcessAffinity | |||
86 | return sched_setaffinity(0, sizeof(cpu_set), &cpu_set) == 0; | 86 | return sched_setaffinity(0, sizeof(cpu_set), &cpu_set) == 0; |
87 | } | 87 | } |
88 | 88 | ||
89 | #else | 89 | #else // Z7_AFFINITY_SUPPORTED |
90 | 90 | ||
91 | void InitST() | 91 | void InitST() |
92 | { | 92 | { |
@@ -114,16 +114,19 @@ struct CProcessAffinity | |||
114 | return FALSE; | 114 | return FALSE; |
115 | } | 115 | } |
116 | 116 | ||
117 | #endif | 117 | #endif // Z7_AFFINITY_SUPPORTED |
118 | }; | 118 | }; |
119 | 119 | ||
120 | #endif | 120 | #endif // _WIN32 |
121 | 121 | ||
122 | 122 | ||
123 | UInt32 GetNumberOfProcessors(); | 123 | UInt32 GetNumberOfProcessors(); |
124 | 124 | ||
125 | bool GetRamSize(UInt64 &size); // returns false, if unknown ram size | 125 | bool GetRamSize(UInt64 &size); // returns false, if unknown ram size |
126 | 126 | ||
127 | unsigned long Get_File_OPEN_MAX(); | ||
128 | unsigned Get_File_OPEN_MAX_Reduced_for_3_tasks(); | ||
129 | |||
127 | }} | 130 | }} |
128 | 131 | ||
129 | #endif | 132 | #endif |