Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/rtworkq/queue.c | 21 +++++++++++++++++++++ dlls/rtworkq/rtworkq.spec | 2 +- include/rtworkq.idl | 1 + 3 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dlls/rtworkq/queue.c b/dlls/rtworkq/queue.c index a6aac6abda..13bce0836a 100644 --- a/dlls/rtworkq/queue.c +++ b/dlls/rtworkq/queue.c @@ -1071,3 +1071,24 @@ HRESULT WINAPI RtwqUnlockWorkQueue(DWORD queue)
return unlock_user_queue(queue); } + +HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable) +{ + struct queue *queue; + HRESULT hr; + int i; + + TRACE("%#x, %d.\n", queue_id, enable); + + lock_user_queue(queue_id); + + if (SUCCEEDED(hr = grab_queue(queue_id, &queue))) + { + for (i = 0; i < ARRAY_SIZE(queue->envs); ++i) + queue->envs[i].u.s.LongFunction = !!enable; + } + + unlock_user_queue(queue_id); + + return hr; +} diff --git a/dlls/rtworkq/rtworkq.spec b/dlls/rtworkq/rtworkq.spec index 48bc17cbfc..2d0d3b40e6 100644 --- a/dlls/rtworkq/rtworkq.spec +++ b/dlls/rtworkq/rtworkq.spec @@ -27,7 +27,7 @@ @ stdcall RtwqScheduleWorkItem(ptr int64 ptr) @ stub RtwqSetDeadline @ stub RtwqSetDeadline2 -@ stub RtwqSetLongRunning +@ stdcall RtwqSetLongRunning(long long) @ stdcall RtwqShutdown() @ stdcall RtwqStartup() @ stub RtwqUnjoinWorkQueue diff --git a/include/rtworkq.idl b/include/rtworkq.idl index 001cf2c3e9..6ddb232fbd 100644 --- a/include/rtworkq.idl +++ b/include/rtworkq.idl @@ -88,6 +88,7 @@ cpp_quote("HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IR cpp_quote("HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result);") cpp_quote("HRESULT WINAPI RtwqRemovePeriodicCallback(DWORD key);") cpp_quote("HRESULT WINAPI RtwqScheduleWorkItem(IRtwqAsyncResult *result, INT64 timeout, RTWQWORKITEM_KEY *key);") +cpp_quote("HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable);") cpp_quote("HRESULT WINAPI RtwqShutdown(void);") cpp_quote("HRESULT WINAPI RtwqStartup(void);") cpp_quote("HRESULT WINAPI RtwqUnlockPlatform(void);")
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/rtworkq/queue.c | 7 +++++++ dlls/rtworkq/rtworkq.spec | 2 +- include/rtworkq.idl | 1 + 3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/rtworkq/queue.c b/dlls/rtworkq/queue.c index 13bce0836a..5e9ca51c60 100644 --- a/dlls/rtworkq/queue.c +++ b/dlls/rtworkq/queue.c @@ -1092,3 +1092,10 @@ HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable)
return hr; } + +HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, DWORD *taskid, DWORD *queue) +{ + FIXME("%s, %d, %p, %p.\n", debugstr_w(usageclass), priority, taskid, queue); + + return RtwqAllocateWorkQueue(RTWQ_STANDARD_WORKQUEUE, queue); +} diff --git a/dlls/rtworkq/rtworkq.spec b/dlls/rtworkq/rtworkq.spec index 2d0d3b40e6..c619b3a867 100644 --- a/dlls/rtworkq/rtworkq.spec +++ b/dlls/rtworkq/rtworkq.spec @@ -16,7 +16,7 @@ @ stdcall RtwqInvokeCallback(ptr) @ stub RtwqJoinWorkQueue @ stdcall RtwqLockPlatform() -@ stub RtwqLockSharedWorkQueue +@ stdcall RtwqLockSharedWorkQueue(wstr long ptr ptr) @ stdcall RtwqLockWorkQueue(long) @ stub RtwqPutMultipleWaitingWorkItem @ stdcall RtwqPutWaitingWorkItem(long long ptr ptr) diff --git a/include/rtworkq.idl b/include/rtworkq.idl index 6ddb232fbd..b27cce49fd 100644 --- a/include/rtworkq.idl +++ b/include/rtworkq.idl @@ -83,6 +83,7 @@ cpp_quote("HRESULT WINAPI RtwqCancelWorkItem(RTWQWORKITEM_KEY key);") cpp_quote("HRESULT WINAPI RtwqCreateAsyncResult(IUnknown *object, IRtwqAsyncCallback *callback, IUnknown *state, IRtwqAsyncResult **result);") cpp_quote("HRESULT WINAPI RtwqInvokeCallback(IRtwqAsyncResult *result);") cpp_quote("HRESULT WINAPI RtwqLockPlatform(void);") +cpp_quote("HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, DWORD *taskid, DWORD *queue);") cpp_quote("HRESULT WINAPI RtwqLockWorkQueue(DWORD queue);") cpp_quote("HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IRtwqAsyncResult *result, RTWQWORKITEM_KEY *key);") cpp_quote("HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result);")
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/rtworkq/queue.c | 21 +++++++++++++++++++++ dlls/rtworkq/rtworkq.spec | 6 +++--- include/rtworkq.idl | 3 +++ 3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/dlls/rtworkq/queue.c b/dlls/rtworkq/queue.c index 5e9ca51c60..a2fb3824c3 100644 --- a/dlls/rtworkq/queue.c +++ b/dlls/rtworkq/queue.c @@ -1099,3 +1099,24 @@ HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, D
return RtwqAllocateWorkQueue(RTWQ_STANDARD_WORKQUEUE, queue); } + +HRESULT WINAPI RtwqSetDeadline(DWORD queue_id, LONGLONG deadline, HANDLE *request) +{ + FIXME("%#x, %s, %p.\n", queue_id, wine_dbgstr_longlong(deadline), request); + + return E_NOTIMPL; +} + +HRESULT WINAPI RtwqSetDeadline2(DWORD queue_id, LONGLONG deadline, LONGLONG predeadline, HANDLE *request) +{ + FIXME("%#x, %s, %s, %p.\n", queue_id, wine_dbgstr_longlong(deadline), wine_dbgstr_longlong(predeadline), request); + + return E_NOTIMPL; +} + +HRESULT WINAPI RtwqCancelDeadline(HANDLE request) +{ + FIXME("%p.\n", request); + + return E_NOTIMPL; +} diff --git a/dlls/rtworkq/rtworkq.spec b/dlls/rtworkq/rtworkq.spec index c619b3a867..1a8909e098 100644 --- a/dlls/rtworkq/rtworkq.spec +++ b/dlls/rtworkq/rtworkq.spec @@ -3,7 +3,7 @@ @ stdcall RtwqAllocateWorkQueue(long ptr) @ stub RtwqBeginRegisterWorkQueueWithMMCSS @ stub RtwqBeginUnregisterWorkQueueWithMMCSS -@ stub RtwqCancelDeadline +@ stdcall RtwqCancelDeadline(long) @ stub RtwqCancelMultipleWaitingWorkItem @ stdcall RtwqCancelWorkItem(int64) @ stdcall RtwqCreateAsyncResult(ptr ptr ptr ptr) @@ -25,8 +25,8 @@ @ stub RtwqRegisterPlatformWithMMCSS @ stdcall RtwqRemovePeriodicCallback(long) @ stdcall RtwqScheduleWorkItem(ptr int64 ptr) -@ stub RtwqSetDeadline -@ stub RtwqSetDeadline2 +@ stdcall RtwqSetDeadline(long int64 ptr) +@ stdcall RtwqSetDeadline2(long int64 int64 ptr) @ stdcall RtwqSetLongRunning(long long) @ stdcall RtwqShutdown() @ stdcall RtwqStartup() diff --git a/include/rtworkq.idl b/include/rtworkq.idl index b27cce49fd..325bebfde5 100644 --- a/include/rtworkq.idl +++ b/include/rtworkq.idl @@ -79,6 +79,7 @@ cpp_quote("typedef void (WINAPI *RTWQPERIODICCALLBACK)(IUnknown *context);")
cpp_quote("HRESULT WINAPI RtwqAddPeriodicCallback(RTWQPERIODICCALLBACK callback, IUnknown *context, DWORD *key);") cpp_quote("HRESULT WINAPI RtwqAllocateWorkQueue(RTWQ_WORKQUEUE_TYPE queue_type, DWORD *queue);") +cpp_quote("HRESULT WINAPI RtwqCancelDeadline(HANDLE request);") cpp_quote("HRESULT WINAPI RtwqCancelWorkItem(RTWQWORKITEM_KEY key);") cpp_quote("HRESULT WINAPI RtwqCreateAsyncResult(IUnknown *object, IRtwqAsyncCallback *callback, IUnknown *state, IRtwqAsyncResult **result);") cpp_quote("HRESULT WINAPI RtwqInvokeCallback(IRtwqAsyncResult *result);") @@ -89,6 +90,8 @@ cpp_quote("HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IR cpp_quote("HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result);") cpp_quote("HRESULT WINAPI RtwqRemovePeriodicCallback(DWORD key);") cpp_quote("HRESULT WINAPI RtwqScheduleWorkItem(IRtwqAsyncResult *result, INT64 timeout, RTWQWORKITEM_KEY *key);") +cpp_quote("HRESULT WINAPI RtwqSetDeadline(DWORD queue_id, LONGLONG deadline, HANDLE *request);") +cpp_quote("HRESULT WINAPI RtwqSetDeadline2(DWORD queue_id, LONGLONG deadline, LONGLONG predeadline, HANDLE *request);") cpp_quote("HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable);") cpp_quote("HRESULT WINAPI RtwqShutdown(void);") cpp_quote("HRESULT WINAPI RtwqStartup(void);")