Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
88ff58ee
Commit
88ff58ee
authored
23 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Store the 16-bit callback in the timer structure instead of using a
thunk.
parent
9fcd89a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/system.c
+9
-12
9 additions, 12 deletions
misc/system.c
with
9 additions
and
12 deletions
misc/system.c
+
9
−
12
View file @
88ff58ee
...
...
@@ -9,9 +9,7 @@
#include
"wine/winbase16.h"
#include
"wine/winuser16.h"
#include
"services.h"
#include
"callback.h"
#include
"stackframe.h"
#include
"builtin16.h"
#include
"debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
system
);
...
...
@@ -19,8 +17,9 @@ DEFAULT_DEBUG_CHANNEL(system);
typedef
struct
{
SYSTEMTIMERPROC
callback
;
/* NULL if not in use */
INT
rate
;
INT
ticks
;
FARPROC16
callback16
;
INT
rate
;
INT
ticks
;
}
SYSTEM_TIMER
;
#define NB_SYS_TIMERS 8
...
...
@@ -126,9 +125,11 @@ WORD WINAPI CreateSystemTimer( WORD rate, SYSTEMTIMERPROC callback )
/**********************************************************************/
static
void
SYSTEM_CallSystemT
imer
P
roc
(
FARPROC16
proc
,
WORD
timer
)
static
void
call_t
imer
_p
roc
16
(
WORD
timer
)
{
CONTEXT86
context
;
FARPROC16
proc
=
SYS_Timers
[
timer
-
1
].
callback16
;
memset
(
&
context
,
'\0'
,
sizeof
(
context
)
);
context
.
SegCs
=
SELECTOROF
(
proc
);
...
...
@@ -145,10 +146,9 @@ static void SYSTEM_CallSystemTimerProc( FARPROC16 proc, WORD timer )
WORD
WINAPI
WIN16_CreateSystemTimer
(
WORD
rate
,
FARPROC16
proc
)
{
FARPROC
thunk
=
THUNK_Alloc
(
proc
,
(
RELAY
)
SYSTEM_CallSystemTimerProc
);
WORD
timer
=
CreateSystemTimer
(
rate
,
(
SYSTEMTIMERPROC
)
thunk
);
if
(
!
timer
)
THUNK_Free
(
thunk
);
return
timer
;
WORD
ret
=
CreateSystemTimer
(
rate
,
call_timer_proc16
);
if
(
ret
)
SYS_Timers
[
ret
-
1
].
callback16
=
proc
;
return
ret
;
}
...
...
@@ -161,10 +161,7 @@ WORD WINAPI SYSTEM_KillSystemTimer( WORD timer )
{
if
(
!
timer
||
timer
>
NB_SYS_TIMERS
||
!
SYS_Timers
[
timer
-
1
].
callback
)
return
timer
;
/* Error */
THUNK_Free
(
(
FARPROC
)
SYS_Timers
[
timer
-
1
].
callback
);
SYS_Timers
[
timer
-
1
].
callback
=
NULL
;
if
(
!--
SYS_NbTimers
)
SYSTEM_StopTicks
();
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment