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
d6d994f1
Commit
d6d994f1
authored
Sep 28, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made event manipulation routines public.
parent
22b861c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
26 deletions
+23
-26
event.c
server/event.c
+14
-26
object.h
server/object.h
+9
-0
No files found.
server/event.c
View file @
d6d994f1
...
...
@@ -59,45 +59,29 @@ static struct event *create_event( const char *name, size_t len,
return
event
;
}
st
atic
int
pulse_event
(
int
handle
)
st
ruct
event
*
get_event_obj
(
struct
process
*
process
,
int
handle
,
unsigned
int
access
)
{
struct
event
*
event
;
return
(
struct
event
*
)
get_handle_obj
(
current
->
process
,
handle
,
access
,
&
event_ops
);
}
if
(
!
(
event
=
(
struct
event
*
)
get_handle_obj
(
current
->
process
,
handle
,
EVENT_MODIFY_STATE
,
&
event_ops
)))
return
0
;
void
pulse_event
(
struct
event
*
event
)
{
event
->
signaled
=
1
;
/* wake up all waiters if manual reset, a single one otherwise */
wake_up
(
&
event
->
obj
,
!
event
->
manual_reset
);
event
->
signaled
=
0
;
release_object
(
event
);
return
1
;
}
static
int
set_event
(
int
handle
)
void
set_event
(
struct
event
*
event
)
{
struct
event
*
event
;
if
(
!
(
event
=
(
struct
event
*
)
get_handle_obj
(
current
->
process
,
handle
,
EVENT_MODIFY_STATE
,
&
event_ops
)))
return
0
;
event
->
signaled
=
1
;
/* wake up all waiters if manual reset, a single one otherwise */
wake_up
(
&
event
->
obj
,
!
event
->
manual_reset
);
release_object
(
event
);
return
1
;
}
static
int
reset_event
(
int
handle
)
void
reset_event
(
struct
event
*
event
)
{
struct
event
*
event
;
if
(
!
(
event
=
(
struct
event
*
)
get_handle_obj
(
current
->
process
,
handle
,
EVENT_MODIFY_STATE
,
&
event_ops
)))
return
0
;
event
->
signaled
=
0
;
release_object
(
event
);
return
1
;
}
static
void
event_dump
(
struct
object
*
obj
,
int
verbose
)
...
...
@@ -149,18 +133,22 @@ DECL_HANDLER(open_event)
/* do an event operation */
DECL_HANDLER
(
event_op
)
{
struct
event
*
event
;
if
(
!
(
event
=
get_event_obj
(
current
->
process
,
req
->
handle
,
EVENT_MODIFY_STATE
)))
return
;
switch
(
req
->
op
)
{
case
PULSE_EVENT
:
pulse_event
(
req
->
handle
);
pulse_event
(
event
);
break
;
case
SET_EVENT
:
set_event
(
req
->
handle
);
set_event
(
event
);
break
;
case
RESET_EVENT
:
reset_event
(
req
->
handle
);
reset_event
(
event
);
break
;
default
:
fatal_protocol_error
(
current
,
"event_op: invalid operation %d
\n
"
,
req
->
op
);
}
release_object
(
event
);
}
server/object.h
View file @
d6d994f1
...
...
@@ -126,6 +126,15 @@ extern void remove_client( struct client *client, int exit_code );
extern
void
client_pass_fd
(
struct
client
*
client
,
int
pass_fd
);
extern
void
client_reply
(
struct
client
*
client
,
unsigned
int
res
);
/* event functions */
struct
event
;
extern
struct
event
*
get_event_obj
(
struct
process
*
process
,
int
handle
,
unsigned
int
access
);
extern
void
pulse_event
(
struct
event
*
event
);
extern
void
set_event
(
struct
event
*
event
);
extern
void
reset_event
(
struct
event
*
event
);
/* mutex functions */
extern
void
abandon_mutexes
(
struct
thread
*
thread
);
...
...
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