Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8d540ec7
Commit
8d540ec7
authored
Jun 08, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schedsvc: Add support for running missed tasks at the service start.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ae794549
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
atsvc.c
dlls/schedsvc/atsvc.c
+24
-0
schedsvc_private.h
dlls/schedsvc/schedsvc_private.h
+1
-0
svc_main.c
dlls/schedsvc/svc_main.c
+1
-0
No files found.
dlls/schedsvc/atsvc.c
View file @
8d540ec7
...
...
@@ -1039,6 +1039,30 @@ void check_task_time(void)
LeaveCriticalSection
(
&
at_job_list_section
);
}
void
check_missed_task_time
(
void
)
{
FILETIME
current_ft
,
last_ft
;
struct
job_t
*
job
;
GetSystemTimeAsFileTime
(
&
current_ft
);
FileTimeToLocalFileTime
(
&
current_ft
,
&
current_ft
);
EnterCriticalSection
(
&
at_job_list_section
);
LIST_FOR_EACH_ENTRY
(
job
,
&
at_job_list
,
struct
job_t
,
entry
)
{
if
(
SystemTimeToFileTime
(
&
job
->
data
.
last_runtime
,
&
last_ft
))
{
if
(
job_runs_at
(
job
,
&
last_ft
,
&
current_ft
))
{
run_job
(
job
);
}
}
}
LeaveCriticalSection
(
&
at_job_list_section
);
}
void
remove_job
(
const
WCHAR
*
name
)
{
struct
job_t
*
job
;
...
...
dlls/schedsvc/schedsvc_private.h
View file @
8d540ec7
...
...
@@ -31,6 +31,7 @@ void update_process_status(DWORD pid) DECLSPEC_HIDDEN;
BOOL
get_next_runtime
(
LARGE_INTEGER
*
rt
)
DECLSPEC_HIDDEN
;
void
check_task_time
(
void
)
DECLSPEC_HIDDEN
;
void
load_at_tasks
(
void
)
DECLSPEC_HIDDEN
;
void
check_missed_task_time
(
void
)
DECLSPEC_HIDDEN
;
static
inline
WCHAR
*
heap_strdupW
(
const
WCHAR
*
src
)
{
...
...
dlls/schedsvc/svc_main.c
View file @
8d540ec7
...
...
@@ -54,6 +54,7 @@ static DWORD WINAPI tasks_monitor_thread(void *arg)
TRACE
(
"Starting...
\n
"
);
load_at_tasks
();
check_missed_task_time
();
htimer
=
CreateWaitableTimerW
(
NULL
,
FALSE
,
NULL
);
if
(
htimer
==
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment