Changeset 372 for branches/samba-3.3.x/source/lib
- Timestamp:
- Jan 15, 2010, 1:16:04 PM (16 years ago)
- Location:
- branches/samba-3.3.x/source/lib
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/lib/os2ea.c
r370 r372 29 29 30 30 #ifndef TESTING 31 32 // Samba DEBUG() needs the following includes and defines 31 33 #define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) 32 34 #define CMD_KI_RDCNT (0x63) 33 35 #include <stdbool.h> 34 36 #include "local.h" 35 37 #include "xfile.h" 36 #define DEBUG(a,b) (0) 37 38 #include "debug.h" 38 39 #else 39 40 … … 167 168 } CPUUTIL; 168 169 170 APIRET APIENTRY(*pfnDosPerfSysCall) (ULONG ulCommand, ULONG ulParm1, ULONG ulParm2, ULONG ulParm3) = NULL; 171 APIRET APIENTRY(*pfnDosQuerySysState) (ULONG func, ULONG arg1, ULONG pid, ULONG _res_, PVOID buf, ULONG bufsz) = NULL; 169 172 170 173 static UCHAR randbyte_perf() … … 174 177 int c; 175 178 176 #ifndef __INNOTEK_LIBC__177 179 if (hDoscalls == 0) { 178 180 char failed_module[20]; … … 183 185 184 186 if (rc == 0) { 185 rc = DosQueryProcAddr(hDoscalls, 976, NULL, (PFN *)& DosPerfSysCall);187 rc = DosQueryProcAddr(hDoscalls, 976, NULL, (PFN *)&pfnDosPerfSysCall); 186 188 187 189 if (rc) { 188 DosPerfSysCall = NULL;190 pfnDosPerfSysCall = NULL; 189 191 } 190 192 } 191 193 } 192 194 193 if ( DosPerfSysCall) {194 if ( DosPerfSysCall(CMD_KI_RDCNT, (ULONG)&util, 0, 0) == 0) {195 if (pfnDosPerfSysCall) { 196 if ((*pfnDosPerfSysCall) (CMD_KI_RDCNT, (ULONG)&util, 0, 0) == 0) { 195 197 for (c = 0; c < sizeof(util); c++) { 196 198 byte ^= ((UCHAR *)&util)[c]; … … 198 200 } 199 201 else { 200 DosPerfSysCall = NULL;202 pfnDosPerfSysCall = NULL; 201 203 } 202 204 } 203 #endif 205 204 206 return byte; 205 207 }
Note:
See TracChangeset
for help on using the changeset viewer.