Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
pikelang
pike
Commits
36709438
Commit
36709438
authored
28 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
bugs fixed
Rev: src/backend.c:1.6 Rev: src/modules/call_out/call_out.c:1.2
parent
a2c02093
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backend.c
+13
-1
13 additions, 1 deletion
src/backend.c
src/modules/call_out/call_out.c
+36
-27
36 additions, 27 deletions
src/modules/call_out/call_out.c
with
49 additions
and
28 deletions
src/backend.c
+
13
−
1
View file @
36709438
...
@@ -191,10 +191,14 @@ void backend()
...
@@ -191,10 +191,14 @@ void backend()
while
(
first_object
)
while
(
first_object
)
{
{
next_timeout
.
tv_usec
=
0
;
next_timeout
.
tv_usec
=
0
;
#if 0
next_timeout.tv_sec = 7 * 24 * 60 * 60; /* See you in a week */
next_timeout.tv_sec = 7 * 24 * 60 * 60; /* See you in a week */
#else
next_timeout
.
tv_sec
=
15
;
/* See you in a week */
#endif
my_add_timeval
(
&
next_timeout
,
&
current_time
);
my_add_timeval
(
&
next_timeout
,
&
current_time
);
call_callback
(
&
backend_callbacks
);
call_callback
(
&
backend_callbacks
,
(
void
*
)
0
);
sets
=
selectors
;
sets
=
selectors
;
alloca
(
0
);
/* Do garbage collect */
alloca
(
0
);
/* Do garbage collect */
...
@@ -204,6 +208,13 @@ void backend()
...
@@ -204,6 +208,13 @@ void backend()
GETTIMEOFDAY
(
&
current_time
);
GETTIMEOFDAY
(
&
current_time
);
my_subtract_timeval
(
&
next_timeout
,
&
current_time
);
my_subtract_timeval
(
&
next_timeout
,
&
current_time
);
if
(
next_timeout
.
tv_sec
<
0
)
{
next_timeout
.
tv_usec
=
0
;
next_timeout
.
tv_sec
=
0
;
}
i
=
select
(
max_fd
+
1
,
&
sets
.
read
,
&
sets
.
write
,
0
,
&
next_timeout
);
i
=
select
(
max_fd
+
1
,
&
sets
.
read
,
&
sets
.
write
,
0
,
&
next_timeout
);
GETTIMEOFDAY
(
&
current_time
);
GETTIMEOFDAY
(
&
current_time
);
...
@@ -236,6 +247,7 @@ void backend()
...
@@ -236,6 +247,7 @@ void backend()
}
}
}
}
call_callback
(
&
backend_callbacks
,
(
void
*
)
1
);
}
}
UNSETJMP
(
back
);
UNSETJMP
(
back
);
...
...
This diff is collapsed.
Click to expand it.
src/modules/call_out/call_out.c
+
36
−
27
View file @
36709438
...
@@ -181,13 +181,15 @@ void f_call_out(INT32 args)
...
@@ -181,13 +181,15 @@ void f_call_out(INT32 args)
new_call_out
(
args
,
sp
-
args
);
new_call_out
(
args
,
sp
-
args
);
}
}
void
do_call_outs
(
struct
callback
*
ignored
,
void
*
ignored_too
)
void
do_call_outs
(
struct
callback
*
ignored
,
void
*
ignored_too
,
void
*
arg
)
{
{
call_out
*
c
;
call_out
*
c
;
int
args
;
int
args
;
time_t
tmp
;
time_t
tmp
;
verify_call_outs
();
verify_call_outs
();
if
(
arg
)
{
tmp
=
(
time_t
)
TIME
(
0
);
tmp
=
(
time_t
)
TIME
(
0
);
while
(
num_pending_calls
&&
while
(
num_pending_calls
&&
my_timercmp
(
&
pending_calls
[
0
]
->
tv
,
<=
,
&
current_time
))
my_timercmp
(
&
pending_calls
[
0
]
->
tv
,
<=
,
&
current_time
))
...
@@ -214,11 +216,18 @@ void do_call_outs(struct callback *ignored, void *ignored_too)
...
@@ -214,11 +216,18 @@ void do_call_outs(struct callback *ignored, void *ignored_too)
if
(
tmp
!=
(
time_t
)
TIME
(
0
))
break
;
if
(
tmp
!=
(
time_t
)
TIME
(
0
))
break
;
}
}
}
else
/* if(arg) */
{
if
(
num_pending_calls
)
if
(
num_pending_calls
)
{
if
(
my_timercmp
(
&
pending_calls
[
0
]
->
tv
,
<
,
&
next_timeout
))
if
(
my_timercmp
(
&
pending_calls
[
0
]
->
tv
,
<
,
&
next_timeout
))
{
next_timeout
=
pending_calls
[
0
]
->
tv
;
next_timeout
=
pending_calls
[
0
]
->
tv
;
}
}
}
}
}
static
int
find_call_out
(
struct
svalue
*
fun
)
static
int
find_call_out
(
struct
svalue
*
fun
)
{
{
...
...
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