本文介绍了用户模式计划程序(UMS)API最低支持的操作系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据MSDN,用户模式调度程序(UMS)API需要64位OS.
http://msdn.microsoft.com/zh-cn/library/dd627165.aspx
但是我在winbase.h中找不到这样的要求,该要求包括在Windows 7的Windows SDK中和.NET Framework 3.5 SP1:"RC" (请参见下文).
另一个宏(例如 _WIN64)?
According to MSDN, User Mode Scheduler (UMS) API requires 64-bit OS.
http://msdn.microsoft.com/en-us/library/dd627165.aspx
But I cannot find such requirement in winbase.h included in "Windows SDK for Windows 7 and .NET Framework 3.5 SP1: RC" (see below).
Another macro (e.g. _WIN64) is needed?
//
// UMS begin
//
#if (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
#define UMS_VERSION RTL_UMS_VERSION
typedef void *PUMS_CONTEXT;
typedef void *PUMS_COMPLETION_LIST;
typedef enum _RTL_UMS_THREAD_INFO_CLASS UMS_THREAD_INFO_CLASS, *PUMS_THREAD_INFO_CLASS;
typedef enum _RTL_UMS_SCHEDULER_REASON UMS_SCHEDULER_REASON;
typedef PRTL_UMS_SCHEDULER_ENTRY_POINT PUMS_SCHEDULER_ENTRY_POINT;
typedef struct _UMS_SCHEDULER_STARTUP_INFO {
//
// UMS Version the application was built to. Should be set to UMS_VERSION
//
ULONG UmsVersion;
//
// Completion List to associate the new User Scheduler to.
//
PUMS_COMPLETION_LIST CompletionList;
//
// A pointer to the application-defined function that represents the starting
// address of the Sheduler.
//
PUMS_SCHEDULER_ENTRY_POINT SchedulerProc;
//
// pointer to a variable to be passed to the scheduler uppon first activation.
//
PVOID SchedulerParam;
} UMS_SCHEDULER_STARTUP_INFO, *PUMS_SCHEDULER_STARTUP_INFO;
__checkReturn
WINBASEAPI
BOOL
WINAPI
CreateUmsCompletionList(
__deref_out PUMS_COMPLETION_LIST* UmsCompletionList
);
WINBASEAPI
BOOL
WINAPI
DequeueUmsCompletionListItems(
__in PUMS_COMPLETION_LIST UmsCompletionList,
__in DWORD WaitTimeOut,
__out PUMS_CONTEXT* UmsThreadList
);
WINBASEAPI
BOOL
WINAPI
GetUmsCompletionListEvent(
__in PUMS_COMPLETION_LIST UmsCompletionList,
__inout PHANDLE UmsCompletionEvent
);
WINBASEAPI
BOOL
WINAPI
ExecuteUmsThread(
__inout PUMS_CONTEXT UmsThread
);
WINBASEAPI
BOOL
WINAPI
UmsThreadYield(
__in PVOID SchedulerParam
);
WINBASEAPI
BOOL
WINAPI
DeleteUmsCompletionList(
__in PUMS_COMPLETION_LIST UmsCompletionList
);
WINBASEAPI
PUMS_CONTEXT
WINAPI
GetCurrentUmsThread(
VOID
);
WINBASEAPI
PUMS_CONTEXT
WINAPI
GetNextUmsListItem(
__inout PUMS_CONTEXT UmsContext
);
WINBASEAPI
BOOL
WINAPI
QueryUmsThreadInformation(
__in PUMS_CONTEXT UmsThread,
__in UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
__out_bcount_part(UmsThreadInformationLength, *ReturnLength) PVOID UmsThreadInformation,
__in ULONG UmsThreadInformationLength,
__out_opt PULONG ReturnLength
);
WINBASEAPI
BOOL
WINAPI
SetUmsThreadInformation(
__in PUMS_CONTEXT UmsThread,
__in UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
__in PVOID UmsThreadInformation,
__in ULONG UmsThreadInformationLength
);
WINBASEAPI
BOOL
WINAPI
DeleteUmsThreadContext(
__in PUMS_CONTEXT UmsThread
);
WINBASEAPI
BOOL
WINAPI
CreateUmsThreadContext(
__deref_out PUMS_CONTEXT *lpUmsThread
);
WINBASEAPI
BOOL
WINAPI
EnterUmsSchedulingMode(
__in PUMS_SCHEDULER_STARTUP_INFO SchedulerStartupInfo
);
#endif // (_WIN32_WINNT >= 0x0601) && !defined(MIDL_PASS)
//
// UMS end
//
推荐答案
这篇关于用户模式计划程序(UMS)API最低支持的操作系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!