summaryrefslogtreecommitdiff
path: root/src/pal/inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/inc')
-rw-r--r--src/pal/inc/pal.h313
-rw-r--r--src/pal/inc/palprivate.h7
-rw-r--r--src/pal/inc/unixasmmacrosarm.inc1
3 files changed, 58 insertions, 263 deletions
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index a07d665b1f..4ac91db0cf 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -501,6 +501,11 @@ PAL_InitializeDebug(
void);
PALIMPORT
+void
+PALAPI
+PAL_IgnoreProfileSignal(int signalNum);
+
+PALIMPORT
HINSTANCE
PALAPI
PAL_RegisterModule(
@@ -586,7 +591,6 @@ CharNextExA(
#define MB_TOPMOST 0x00040000L
#define MB_NOFOCUS 0x00008000L
-#define MB_SETFOREGROUND 0x00010000L
#define MB_DEFAULT_DESKTOP_ONLY 0x00020000L
// Note: this is the NT 4.0 and greater value.
@@ -621,34 +625,6 @@ MessageBoxW(
#define MessageBox MessageBoxA
#endif
-/***************** wincon.h Entrypoints **********************************/
-
-#define CTRL_C_EVENT 0
-#define CTRL_BREAK_EVENT 1
-#define CTRL_CLOSE_EVENT 2
-// 3 is reserved!
-// 4 is reserved!
-#define CTRL_LOGOFF_EVENT 5
-#define CTRL_SHUTDOWN_EVENT 6
-
-typedef
-BOOL
-(PALAPI *PHANDLER_ROUTINE)(
- DWORD CtrlType
- );
-
-#ifndef CORECLR
-PALIMPORT
-BOOL
-PALAPI
-GenerateConsoleCtrlEvent(
- IN DWORD dwCtrlEvent,
- IN DWORD dwProcessGroupId
- );
-#endif // !CORECLR
-
-//end wincon.h Entrypoints
-
// From win32.h
#ifndef _CRTIMP
#ifdef __llvm__
@@ -659,12 +635,6 @@ GenerateConsoleCtrlEvent(
#endif // _CRTIMP
/******************* winbase.h Entrypoints and defines ************************/
-PALIMPORT
-BOOL
-PALAPI
-AreFileApisANSI(
- VOID);
-
typedef struct _SECURITY_ATTRIBUTES {
DWORD nLength;
LPVOID lpSecurityDescriptor;
@@ -730,28 +700,6 @@ CreateFileW(
#define CreateFile CreateFileA
#endif
-PALIMPORT
-BOOL
-PALAPI
-LockFile(
- IN HANDLE hFile,
- IN DWORD dwFileOffsetLow,
- IN DWORD dwFileOffsetHigh,
- IN DWORD nNumberOfBytesToLockLow,
- IN DWORD nNumberOfBytesToLockHigh
- );
-
-PALIMPORT
-BOOL
-PALAPI
-UnlockFile(
- IN HANDLE hFile,
- IN DWORD dwFileOffsetLow,
- IN DWORD dwFileOffsetHigh,
- IN DWORD nNumberOfBytesToUnlockLow,
- IN DWORD nNumberOfBytesToUnlockHigh
- );
-
PALIMPORT
DWORD
@@ -801,19 +749,6 @@ DeleteFileW(
-PALIMPORT
-BOOL
-PALAPI
-MoveFileW(
- IN LPCWSTR lpExistingFileName,
- IN LPCWSTR lpNewFileName);
-
-#ifdef UNICODE
-#define MoveFile MoveFileW
-#else
-#define MoveFile MoveFileA
-#endif
-
#define MOVEFILE_REPLACE_EXISTING 0x00000001
#define MOVEFILE_COPY_ALLOWED 0x00000002
@@ -1085,24 +1020,6 @@ CompareFileTime(
IN CONST FILETIME *lpFileTime2);
PALIMPORT
-BOOL
-PALAPI
-SetFileTime(
- IN HANDLE hFile,
- IN CONST FILETIME *lpCreationTime,
- IN CONST FILETIME *lpLastAccessTime,
- IN CONST FILETIME *lpLastWriteTime);
-
-PALIMPORT
-BOOL
-PALAPI
-GetFileTime(
- IN HANDLE hFile,
- OUT LPFILETIME lpCreationTime,
- OUT LPFILETIME lpLastAccessTime,
- OUT LPFILETIME lpLastWriteTime);
-
-PALIMPORT
VOID
PALAPI
GetSystemTimeAsFileTime(
@@ -1132,15 +1049,6 @@ FileTimeToSystemTime(
IN CONST FILETIME *lpFileTime,
OUT LPSYSTEMTIME lpSystemTime);
-PALIMPORT
-BOOL
-PALAPI
-FileTimeToDosDateTime(
- IN CONST FILETIME *lpFileTime,
- OUT LPWORD lpFatDate,
- OUT LPWORD lpFatTime
- );
-
PALIMPORT
@@ -1149,24 +1057,6 @@ PALAPI
FlushFileBuffers(
IN HANDLE hFile);
-#define FILE_TYPE_UNKNOWN 0x0000
-#define FILE_TYPE_DISK 0x0001
-#define FILE_TYPE_CHAR 0x0002
-#define FILE_TYPE_PIPE 0x0003
-#define FILE_TYPE_REMOTE 0x8000
-
-PALIMPORT
-DWORD
-PALAPI
-GetFileType(
- IN HANDLE hFile);
-
-PALIMPORT
-UINT
-PALAPI
-GetConsoleCP(
- VOID);
-
PALIMPORT
UINT
PALAPI
@@ -1267,31 +1157,6 @@ SetCurrentDirectoryW(
#define SetCurrentDirectory SetCurrentDirectoryA
#endif
-// maximum length of the NETBIOS name (not including NULL)
-#define MAX_COMPUTERNAME_LENGTH 15
-
-// maximum length of the username (not including NULL)
-#define UNLEN 256
-
-PALIMPORT
-BOOL
-PALAPI
-GetUserNameW(
- OUT LPWSTR lpBuffer, // address of name buffer
- IN OUT LPDWORD nSize ); // address of size of name buffer
-
-PALIMPORT
-BOOL
-PALAPI
-GetComputerNameW(
- OUT LPWSTR lpBuffer, // address of name buffer
- IN OUT LPDWORD nSize); // address of size of name buffer
-
-#ifdef UNICODE
-#define GetUserName GetUserNameW
-#define GetComputerName GetComputerNameW
-#endif // UNICODE
-
PALIMPORT
HANDLE
PALAPI
@@ -1626,19 +1491,6 @@ WaitForMultipleObjectsEx(
IN DWORD dwMilliseconds,
IN BOOL bAlertable);
-PALIMPORT
-RHANDLE
-PALAPI
-PAL_LocalHandleToRemote(
- IN HANDLE hLocal);
-
-PALIMPORT
-HANDLE
-PALAPI
-PAL_RemoteHandleToLocal(
- IN RHANDLE hRemote);
-
-
#define DUPLICATE_CLOSE_SOURCE 0x00000001
#define DUPLICATE_SAME_ACCESS 0x00000002
@@ -1697,13 +1549,6 @@ ExitThread(
IN DWORD dwExitCode);
PALIMPORT
-BOOL
-PALAPI
-GetExitCodeThread(
- IN HANDLE hThread,
- IN LPDWORD lpExitCode);
-
-PALIMPORT
DWORD
PALAPI
ResumeThread(
@@ -2569,18 +2414,20 @@ PALAPI
PAL_GetWorkingSetSize(size_t* val);
PALIMPORT
+BOOL
+PALAPI
+PAL_GetCpuLimit(UINT* val);
+
+PALIMPORT
size_t
PALAPI
PAL_GetLogicalProcessorCacheSizeFromOS(VOID);
-typedef BOOL (*ReadMemoryWordCallback)(SIZE_T address, SIZE_T *value);
+typedef BOOL(*UnwindReadMemoryCallback)(PVOID address, PVOID buffer, SIZE_T size);
PALIMPORT BOOL PALAPI PAL_VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers);
-PALIMPORT BOOL PALAPI PAL_VirtualUnwindOutOfProc(CONTEXT *context,
- KNONVOLATILE_CONTEXT_POINTERS *contextPointers,
- DWORD pid,
- ReadMemoryWordCallback readMemCallback);
+PALIMPORT BOOL PALAPI PAL_VirtualUnwindOutOfProc(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPointers, SIZE_T baseAddress, UnwindReadMemoryCallback readMemoryCallback);
#define GetLogicalProcessorCacheSizeFromOS PAL_GetLogicalProcessorCacheSizeFromOS
@@ -2728,13 +2575,6 @@ MapViewOfFileEx(
IN DWORD dwFileOffsetLow,
IN SIZE_T dwNumberOfBytesToMap,
IN LPVOID lpBaseAddress);
-
-PALIMPORT
-BOOL
-PALAPI
-FlushViewOfFile(
- IN LPVOID lpBaseAddress,
- IN SIZE_T dwNumberOfBytesToFlush);
PALIMPORT
BOOL
@@ -2953,13 +2793,6 @@ RtlMoveMemory(
IN CONST VOID *Source,
IN SIZE_T Length);
-PALIMPORT
-VOID
-PALAPI
-RtlZeroMemory(
- IN PVOID Destination,
- IN SIZE_T Length);
-
#define MoveMemory memmove
#define CopyMemory memcpy
#define FillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
@@ -4245,6 +4078,52 @@ BitScanForward64(
return bRet;
}
+// Define BitScanReverse64 and BitScanReverse
+// Per MSDN, BitScanReverse64 or BitScanReverse will search the mask data from most significant bit (MSB)
+// to least significant bit (LSB) for a set bit (1).
+// If one is found, its bit position is returned in the out PDWORD argument and 1 is returned.
+// Otherwise, 0 is returned.
+//
+// On GCC, the equivalent function is __builtin_clzll or __builtin_clz. It returns 1+index of the most
+// significant set bit, or undefined result if mask is zero.
+EXTERN_C
+PALIMPORT
+inline
+unsigned char
+PALAPI
+BitScanReverse(
+ IN OUT PDWORD Index,
+ IN UINT qwMask)
+{
+ unsigned char bRet = FALSE;
+ if (qwMask != 0)
+ {
+ *Index = (UINT) (8 * sizeof (UINT) - __builtin_clz(qwMask) - 1);
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+EXTERN_C
+PALIMPORT
+inline
+unsigned char
+PALAPI
+BitScanReverse64(
+ IN OUT PDWORD Index,
+ IN UINT64 qwMask)
+{
+ unsigned char bRet = FALSE;
+ if (qwMask != 0)
+ {
+ *Index = (UINT) (8 * sizeof (UINT64) - __builtin_clzll(qwMask) - 1);
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
/*++
Function:
InterlockedIncrement
@@ -4819,20 +4698,6 @@ GetSystemInfo(
PALIMPORT
BOOL
PALAPI
-GetDiskFreeSpaceW(
- LPCWSTR lpDirectoryName,
- LPDWORD lpSectorsPerCluster,
- LPDWORD lpBytesPerSector,
- LPDWORD lpNumberOfFreeClusters,
- LPDWORD lpTotalNumberOfClusters);
-
-#ifdef UNICODE
-#define GetDiskFreeSpace GetDiskFreeSpaceW
-#endif
-
-PALIMPORT
-BOOL
-PALAPI
CreatePipe(
OUT PHANDLE hReadPipe,
OUT PHANDLE hWritePipe,
@@ -4840,33 +4705,6 @@ CreatePipe(
IN DWORD nSize
);
-PALIMPORT
-BOOL
-PALAPI
-DeregisterEventSource (
- IN HANDLE hEventLog
- );
-
-PALIMPORT
-HANDLE
-PALAPI
-RegisterEventSourceA (
- IN OPTIONAL LPCSTR lpUNCServerName,
- IN LPCSTR lpSourceName
- );
-PALIMPORT
-HANDLE
-PALAPI
-RegisterEventSourceW (
- IN OPTIONAL LPCWSTR lpUNCServerName,
- IN LPCWSTR lpSourceName
- );
-#ifdef UNICODE
-#define RegisterEventSource RegisterEventSourceW
-#else
-#define RegisterEventSource RegisterEventSourceA
-#endif // !UNICODE
-
//
// NUMA related APIs
//
@@ -5041,40 +4879,6 @@ GetProcessAffinityMask(
#define EVENTLOG_AUDIT_FAILURE 0x0010
PALIMPORT
-BOOL
-PALAPI
-ReportEventA (
- IN HANDLE hEventLog,
- IN WORD wType,
- IN WORD wCategory,
- IN DWORD dwEventID,
- IN OPTIONAL PSID lpUserSid,
- IN WORD wNumStrings,
- IN DWORD dwDataSize,
- IN OPTIONAL LPCSTR *lpStrings,
- IN OPTIONAL LPVOID lpRawData
- );
-PALIMPORT
-BOOL
-PALAPI
-ReportEventW (
- IN HANDLE hEventLog,
- IN WORD wType,
- IN WORD wCategory,
- IN DWORD dwEventID,
- IN OPTIONAL PSID lpUserSid,
- IN WORD wNumStrings,
- IN DWORD dwDataSize,
- IN OPTIONAL LPCWSTR *lpStrings,
- IN OPTIONAL LPVOID lpRawData
- );
-#ifdef UNICODE
-#define ReportEvent ReportEventW
-#else
-#define ReportEvent ReportEventA
-#endif // !UNICODE
-
-PALIMPORT
HRESULT
PALAPI
CoCreateGuid(OUT GUID * pguid);
@@ -5287,7 +5091,6 @@ PALIMPORT char * __cdecl _strlwr(char *);
PALIMPORT int __cdecl _stricmp(const char *, const char *);
PALIMPORT int __cdecl vsprintf_s(char *, size_t, const char *, va_list);
PALIMPORT char * __cdecl _gcvt_s(char *, int, double, int);
-PALIMPORT char * __cdecl _ecvt(double, int, int *, int *);
PALIMPORT int __cdecl __iscsym(int);
PALIMPORT unsigned char * __cdecl _mbsinc(const unsigned char *);
PALIMPORT unsigned char * __cdecl _mbsninc(const unsigned char *, size_t);
diff --git a/src/pal/inc/palprivate.h b/src/pal/inc/palprivate.h
index 554a5028ad..ce1a9a99a1 100644
--- a/src/pal/inc/palprivate.h
+++ b/src/pal/inc/palprivate.h
@@ -61,13 +61,6 @@ DeleteFileA(
PALIMPORT
BOOL
PALAPI
-MoveFileA(
- IN LPCSTR lpExistingFileName,
- IN LPCSTR lpNewFileName);
-
-PALIMPORT
-BOOL
-PALAPI
MoveFileExA(
IN LPCSTR lpExistingFileName,
IN LPCSTR lpNewFileName,
diff --git a/src/pal/inc/unixasmmacrosarm.inc b/src/pal/inc/unixasmmacrosarm.inc
index 76ea5eb93c..e4a3658b6c 100644
--- a/src/pal/inc/unixasmmacrosarm.inc
+++ b/src/pal/inc/unixasmmacrosarm.inc
@@ -72,7 +72,6 @@ C_FUNC(\Name\()_End):
.macro free_stack Size
add sp, sp, (\Size)
- .pad #-(\Size)
.endm
.macro POP_CALLEE_SAVED_REGISTERS