HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SYS_Platform.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * Authored by:
7  * Side Effects Software Inc.
8  *
9  * NAME: SYS_Platform.h (SYS Library, C++)
10  *
11  * COMMENTS: Functions related to OS/Machine specific
12  * information.
13  */
14 
15 #ifndef __SYS_Platform_h__
16 #define __SYS_Platform_h__
17 
18 #include "SYS_API.h"
19 #include "SYS_Types.h"
20 #include <string>
21 
22 /// Get processor information about the CPU that Houdini is running on.
23 /// Please see SYS_ProcessorDefines.h for CPU information
24 SYS_API extern void SYSgetProcessor(int &majortype, int &flags);
25 
26 /// Returns the number of processors available for the process, taking into
27 /// account affinity masks.
28 SYS_API extern int SYSgetProcessorCount();
29 
30 #if defined(WIN32)
31 /// These are intended for private use by UT_Thread
32 /// @{
33 struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX;
34 SYS_API extern const struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *SYSgetProcessorGroupInfo();
35 struct _GROUP_AFFINITY;
36 typedef int (__stdcall *SetThreadGroupAffinityFunc)(void*, const struct _GROUP_AFFINITY *, struct _GROUP_AFFINITY*);
37 SYS_API extern SetThreadGroupAffinityFunc SYSgetSetThreadGroupAffinity();
38 /// @}
39 #endif
40 
41 /// Find the name of the operating system that Houdini was compiled for
42 SYS_API extern const char *SYSgetOsProc();
43 
44 /// Return a "nice" name of the current operating system
46 
47 /// Find the exact OS, 32-bit or 64-bit build, compiler version
48 SYS_API extern const char *SYSgetPlatformSpec();
49 
50 /// Returns the amount of installed memory (not VM).
52 
53 /// Returns a char* representing the manufacturerer's name
55 
56 /// Just a handy, quick, and fast function to test the platform for which
57 /// the code is being compiled.
58 SYS_API extern bool SYSisMBSD();
59 SYS_API extern bool SYSisLinux();
60 SYS_API extern bool SYSisWindows();
61 
62 /// Return the MAC addresses for all the deviced on this system. The caller is
63 /// responsible to delete [] the addresses if num_addresses > 0.
64 SYS_API extern void SYSgetMACAddresses(
65  unsigned char *&addresses,
66  int &num_addresses);
67 
68 /// Return a single MAC address that we treat as the main MAC address for this
69 /// machine. Returns false if no MAC address could be determined.
70 SYS_API extern bool SYSgetMACAddress(unsigned char mac_address[6]);
71 
72 // Return the MAC address giving the same value returned by Python's
73 // uuid.getnode().
74 SYS_API extern bool SYSgetMACAddressAsInteger(int64 &mac_address);
75 
76 #endif // __UT_SysSpecific_h__
SYS_API const char * SYSgetPlatformSpec()
Find the exact OS, 32-bit or 64-bit build, compiler version.
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
SYS_API std::string SYSgetCPUBrandString()
Returns a char* representing the manufacturerer's name.
GLbitfield flags
Definition: glcorearb.h:1595
SYS_API std::string SYSgetRuntimeOSLabel()
Return a "nice" name of the current operating system.
long long int64
Definition: SYS_Types.h:106
SYS_API bool SYSisWindows()
int64 exint
Definition: SYS_Types.h:115
SYS_API bool SYSisLinux()
SYS_API bool SYSisMBSD()
SYS_API void SYSgetMACAddresses(unsigned char *&addresses, int &num_addresses)
SYS_API const char * SYSgetOsProc()
Find the name of the operating system that Houdini was compiled for.
SYS_API bool SYSgetMACAddressAsInteger(int64 &mac_address)
SYS_API bool SYSgetMACAddress(unsigned char mac_address[6])
SYS_API exint SYSgetMemorySize()
Returns the amount of installed memory (not VM).
typedef int
Definition: png.h:1175
SYS_API int SYSgetProcessorCount()
#define SYS_API
Definition: SYS_API.h:11
SYS_API void SYSgetProcessor(int &majortype, int &flags)