0
Queue_delayed_work is a non blocking "timer" function which will queue `dwork` after `delay` jiffies.

同じことを行う非ブロック関数WIN APIが見つかりません。

何らかの機能があるかどうかはわかりませんが、わかりません。または、このようなものをどのように実装できますか (非ブロックの「タイマー」 。少なくともjiffiesの後にキューdworkに入れられます。workq delay

4

1 に答える 1

0

Linux ユーザー空間の場合、teo システム コールのみが、イベントで呼び出しプロセスを同時にブロックすることなくタイマーを設定できます。

-timer_set_time
-Alarm

Win カーネルの場合、

KTIMERで実装可能

KTIMER (Wdm.h)
KeInitializeTimer(PKTIMER Timer):
Timer: Pointer to a timer object, for which the caller provides the storage.
KeSetTimer (PKTIMER Timer, LARGE_INTEGER DueTimer, **PKDPC Dpc**)

Win ユーザー空間の場合、

待機可能なタイマー オブジェクトで実装できます。

BOOL SetWaitableTimer(
HANDLE hTimer, // handle to a timer object
const LARGE_INTEGER *pDueTime, // when timer will become signaled
LONG lPeriod, // periodic timer interval
PTIMERAPCROUTINE pfnCompletionRoutine, // pointer to the completion routine
LPVOID lpArgToCompletionRoutine, // data passed to the completion routine
BOOL fResume // flag for resume state    
);
于 2012-04-30T17:36:19.053 に答える