Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
2cb90c4e
Commit
2cb90c4e
authored
Apr 19, 2020
by
Tomasz Wlostowski
Committed by
Grzegorz Daniluk
Apr 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: implement callback-less event listeners
parent
f2d0c9f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
event.c
lib/event.c
+6
-1
event.h
lib/event.h
+2
-0
No files found.
lib/event.c
View file @
2cb90c4e
...
...
@@ -153,4 +153,9 @@ int events_dispatch()
if
(
eh
->
handler
)
eh
->
handler
(
queue_get
(
&
eh
->
queue
));
}
}
\ No newline at end of file
}
int
event_listener_create
(
void
)
{
return
event_handler_register
(
-
1
,
1
,
NULL
);
}
lib/event.h
View file @
2cb90c4e
...
...
@@ -11,8 +11,10 @@
#define __EVENT_H
int
event_handler_register
(
int
mask
,
int
enable
,
void
(
*
func
)(
int
)
);
int
event_listener_create
(
void
);
int
event_handler_enable
(
int
id
,
int
enable
);
int
event_post
(
int
event
);
int
event_poll
(
int
handler
);
int
events_init
(
void
);
int
events_dispatch
(
void
);
...
...
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