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
9b92a591
Commit
9b92a591
authored
Dec 29, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make timer callback function and argument client_ptr_t instead of void pointers.
parent
cc55fd31
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
21 deletions
+30
-21
sync.c
dlls/ntdll/sync.c
+7
-3
server_protocol.h
include/wine/server_protocol.h
+6
-6
protocol.def
server/protocol.def
+5
-5
timer.c
server/timer.c
+3
-3
trace.c
server/trace.c
+9
-4
No files found.
dlls/ntdll/sync.c
View file @
9b92a591
...
...
@@ -671,8 +671,8 @@ NTSTATUS WINAPI NtSetTimer(IN HANDLE handle,
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
period
=
period
;
req
->
expire
=
when
->
QuadPart
;
req
->
callback
=
callback
;
req
->
arg
=
callback_arg
;
req
->
callback
=
wine_server_client_ptr
(
callback
)
;
req
->
arg
=
wine_server_client_ptr
(
callback_arg
)
;
status
=
wine_server_call
(
req
);
if
(
state
)
*
state
=
reply
->
signaled
;
}
...
...
@@ -856,9 +856,13 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
user_apc
=
TRUE
;
break
;
case
APC_TIMER
:
call
->
timer
.
func
(
call
->
timer
.
arg
,
(
DWORD
)
call
->
timer
.
time
,
(
DWORD
)(
call
->
timer
.
time
>>
32
)
);
{
void
(
WINAPI
*
func
)(
void
*
,
unsigned
int
,
unsigned
int
)
=
wine_server_get_ptr
(
call
->
timer
.
func
);
func
(
wine_server_get_ptr
(
call
->
timer
.
arg
),
(
DWORD
)
call
->
timer
.
time
,
(
DWORD
)(
call
->
timer
.
time
>>
32
)
);
user_apc
=
TRUE
;
break
;
}
case
APC_ASYNC_IO
:
result
->
type
=
call
->
type
;
result
->
async_io
.
status
=
call
->
async_io
.
func
(
call
->
async_io
.
user
,
...
...
include/wine/server_protocol.h
View file @
9b92a591
...
...
@@ -277,10 +277,10 @@ typedef union
}
user
;
struct
{
enum
apc_type
type
;
void
(
__stdcall
*
func
)(
void
*
,
unsigned
int
,
unsigned
int
)
;
enum
apc_type
type
;
client_ptr_t
func
;
timeout_t
time
;
void
*
arg
;
client_ptr_t
arg
;
}
timer
;
struct
{
...
...
@@ -2203,9 +2203,9 @@ struct set_timer_request
struct
request_header
__header
;
obj_handle_t
handle
;
timeout_t
expire
;
client_ptr_t
callback
;
client_ptr_t
arg
;
int
period
;
void
*
callback
;
void
*
arg
;
};
struct
set_timer_reply
{
...
...
@@ -5052,6 +5052,6 @@ union generic_reply
struct
set_window_layered_info_reply
set_window_layered_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 36
2
#define SERVER_PROTOCOL_VERSION 36
3
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
9b92a591
...
...
@@ -293,10 +293,10 @@ typedef union
} user;
struct
{
enum apc_type type; /* APC_TIMER */
void (__stdcall *func)(void*, unsigned int, unsigned int);
enum apc_type
type; /* APC_TIMER */
client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
timeout_t time; /* absolute time of expiration */
void *
arg; /* user argument */
client_ptr_t
arg; /* user argument */
} timer;
struct
{
...
...
@@ -1669,9 +1669,9 @@ enum char_info_mode
@REQ(set_timer)
obj_handle_t handle; /* handle to the timer */
timeout_t expire; /* next expiration absolute time */
client_ptr_t callback; /* callback function */
client_ptr_t arg; /* callback argument */
int period; /* timer period in ms */
void* callback; /* callback function */
void* arg; /* callback argument */
@REPLY
int signaled; /* was the timer signaled before this call ? */
@END
...
...
server/timer.c
View file @
9b92a591
...
...
@@ -46,8 +46,8 @@ struct timer
timeout_t
when
;
/* next expiration */
struct
timeout_user
*
timeout
;
/* timeout user */
struct
thread
*
thread
;
/* thread that set the APC function */
void
*
callback
;
/* callback APC function */
void
*
arg
;
/* callback argument */
client_ptr_t
callback
;
/* callback APC function */
client_ptr_t
arg
;
/* callback argument */
};
static
void
timer_dump
(
struct
object
*
obj
,
int
verbose
);
...
...
@@ -160,7 +160,7 @@ static int cancel_timer( struct timer *timer )
/* set the timer expiration and period */
static
int
set_timer
(
struct
timer
*
timer
,
timeout_t
expire
,
unsigned
int
period
,
void
*
callback
,
void
*
arg
)
client_ptr_t
callback
,
client_ptr_t
arg
)
{
int
signaled
=
cancel_timer
(
timer
);
if
(
timer
->
manual
)
...
...
server/trace.c
View file @
9b92a591
...
...
@@ -125,7 +125,8 @@ static void dump_apc_call( const apc_call_t *call )
case
APC_TIMER
:
fprintf
(
stderr
,
"APC_TIMER,time="
);
dump_timeout
(
&
call
->
timer
.
time
);
fprintf
(
stderr
,
",arg=%p"
,
call
->
timer
.
arg
);
fprintf
(
stderr
,
",arg="
);
dump_uint64
(
&
call
->
timer
.
arg
);
break
;
case
APC_ASYNC_IO
:
fprintf
(
stderr
,
"APC_ASYNC_IO,func=%p,user=%p,sb=%p,status=%s"
,
...
...
@@ -2166,9 +2167,13 @@ static void dump_set_timer_request( const struct set_timer_request *req )
fprintf
(
stderr
,
" expire="
);
dump_timeout
(
&
req
->
expire
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" period=%d,"
,
req
->
period
);
fprintf
(
stderr
,
" callback=%p,"
,
req
->
callback
);
fprintf
(
stderr
,
" arg=%p"
,
req
->
arg
);
fprintf
(
stderr
,
" callback="
);
dump_uint64
(
&
req
->
callback
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" arg="
);
dump_uint64
(
&
req
->
arg
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" period=%d"
,
req
->
period
);
}
static
void
dump_set_timer_reply
(
const
struct
set_timer_reply
*
req
)
...
...
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