Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
www
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fernando Ortiz
www
Commits
aed58001
Commit
aed58001
authored
21 years ago
by
Dan Egnor
Browse files
Options
Downloads
Patches
Plain Diff
Add oop_sys_run_once()
parent
61924a99
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
oop_sys.html
+2
-1
2 additions, 1 deletion
oop_sys.html
oop_sys_run.html
+12
-6
12 additions, 6 deletions
oop_sys_run.html
ref.html
+1
-0
1 addition, 0 deletions
ref.html
with
15 additions
and
7 deletions
oop_sys.html
+
2
−
1
View file @
aed58001
...
@@ -29,7 +29,8 @@ void oop_sys_delete(oop_source_sys *sys);
...
@@ -29,7 +29,8 @@ void oop_sys_delete(oop_source_sys *sys);
event source interface and manages a select() loop. Once the system event
event source interface and manages a select() loop. Once the system event
source is created, use
<a
href=
"oop_sys_source"
>
oop_sys_source()
</a>
to
source is created, use
<a
href=
"oop_sys_source"
>
oop_sys_source()
</a>
to
access the event source interface (which lets you register event sinks), and
access the event source interface (which lets you register event sinks), and
<a
href=
"oop_sys_run"
>
oop_sys_run()
</a>
to actually process events.
<a
href=
"oop_sys_run"
>
oop_sys_run()
</a>
or
<a
href=
"oop_sys_run"
>
oop_sys_run_once()
</a>
to actually process events.
More than one system event source can exist, though it is rarely useful to do
More than one system event source can exist, though it is rarely useful to do
so (since only one may be active at a time).
<p>
so (since only one may be active at a time).
<p>
...
...
This diff is collapsed.
Click to expand it.
oop_sys_run.html
+
12
−
6
View file @
aed58001
...
@@ -4,13 +4,14 @@
...
@@ -4,13 +4,14 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
>
</head><body>
</head><body>
<h2>
oop_sys_run()
</h2>
<h2>
oop_sys_run()
, oop_sys_run_once()
</h2>
<pre>
<pre>
#include
<
oop.h
>
#include
<
oop.h
>
/*
<em>
Run the event loop.
</em>
*/
/*
<em>
Run the event loop.
</em>
*/
oop_source *oop_sys_run(oop_source_sys *sys);
oop_source *oop_sys_run(oop_source_sys *sys);
oop_source *oop_sys_run_once(oop_source_sys *sys);
</pre>
</pre>
<h3>
Arguments.
</h3>
<h3>
Arguments.
</h3>
...
@@ -21,11 +22,11 @@ oop_source *oop_sys_run(oop_source_sys *sys);
...
@@ -21,11 +22,11 @@ oop_source *oop_sys_run(oop_source_sys *sys);
<h3>
Description.
</h3>
<h3>
Description.
</h3>
Th
is
function starts waiting for events registered with the
system event
Th
e oop_sys_run()
function starts waiting for events registered with the
source
<em>
sys
</em>
. As events (file descriptor activity, timed
events, and
system event
source
<em>
sys
</em>
. As events (file descriptor activity, timed
signals) occur, the appropriate event sinks are called. As long
as these
events, and
signals) occur, the appropriate event sinks are called. As long
callbacks return OOP_CONTINUE, the function continues running and
processing
as these
callbacks return OOP_CONTINUE, the function continues running and
events.
<p>
processing
events.
<p>
When one of the callbacks returns some other value, oop_sys_run returns this
When one of the callbacks returns some other value, oop_sys_run returns this
value. You can use this technique to allow callbacks to return data to the
value. You can use this technique to allow callbacks to return data to the
...
@@ -36,4 +37,9 @@ If an error occurs waiting for events, oop_sys_run returns OOP_ERROR.
...
@@ -36,4 +37,9 @@ If an error occurs waiting for events, oop_sys_run returns OOP_ERROR.
If no event sinks are registered (which would lead to an infinite delay),
If no event sinks are registered (which would lead to an infinite delay),
oop_sys_run returns OOP_CONTINUE.
<p>
oop_sys_run returns OOP_CONTINUE.
<p>
The oop_sys_run_once() function behaves just like oop_sys_run(), but returns
immediately after processing any pending results. The return values are the
same as oop_sys_run(), except that a return of OOP_CONTINUE does not
necessarily mean that no event sinks are registered.
<p>
<hr><a
href=
"ref"
>
liboop reference
</a></body></html>
<hr><a
href=
"ref"
>
liboop reference
</a></body></html>
This diff is collapsed.
Click to expand it.
ref.html
+
1
−
0
View file @
aed58001
...
@@ -43,6 +43,7 @@ void <a href="oop_sys">oop_sys_delete</a>(oop_source_sys *);
...
@@ -43,6 +43,7 @@ void <a href="oop_sys">oop_sys_delete</a>(oop_source_sys *);
/*
<em>
Run the system event loop.
</em>
*/
/*
<em>
Run the system event loop.
</em>
*/
void *
<a
href=
"oop_sys_run"
>
oop_sys_run
</a>
(oop_source_sys *);
void *
<a
href=
"oop_sys_run"
>
oop_sys_run
</a>
(oop_source_sys *);
void *
<a
href=
"oop_sys_run"
>
oop_sys_run_once
</a>
(oop_source_sys *);
/*
<em>
Get the standard source interface for a system event source.
</em>
*/
/*
<em>
Get the standard source interface for a system event source.
</em>
*/
oop_source *
<a
href=
"oop_sys_source"
>
oop_sys_source
</a>
(oop_source_sys *);
oop_source *
<a
href=
"oop_sys_source"
>
oop_sys_source
</a>
(oop_source_sys *);
...
...
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