Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
d4d73dfe
Commit
d4d73dfe
authored
Feb 18, 2013
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trackrdrd: unified indentation style, some code cleanup
parent
e2163244
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
345 additions
and
370 deletions
+345
-370
child.c
trackrdrd/src/child.c
+73
-74
data.c
trackrdrd/src/data.c
+18
-18
handler.c
trackrdrd/src/handler.c
+6
-6
monitor.c
trackrdrd/src/monitor.c
+31
-31
spmcq.c
trackrdrd/src/spmcq.c
+0
-20
test_mq.c
trackrdrd/src/test/test_mq.c
+1
-1
test_spmcq.c
trackrdrd/src/test/test_spmcq.c
+24
-24
trackrdrd.c
trackrdrd/src/trackrdrd.c
+150
-150
trackrdrd.h
trackrdrd/src/trackrdrd.h
+5
-5
worker.c
trackrdrd/src/worker.c
+37
-41
No files found.
trackrdrd/src/child.c
View file @
d4d73dfe
...
...
@@ -965,7 +965,6 @@ CHILD_Main(struct VSM_data *vd, int endless, int readconfig)
/* Main loop */
term
=
0
;
/* XXX: Varnish restart? */
/* XXX: TERM not noticed until request received */
while
(
VSL_Dispatch
(
vd
,
OSL_Track
,
NULL
)
>
0
)
if
(
term
||
!
endless
)
...
...
trackrdrd/src/data.c
View file @
d4d73dfe
trackrdrd/src/handler.c
View file @
d4d73dfe
trackrdrd/src/monitor.c
View file @
d4d73dfe
trackrdrd/src/spmcq.c
View file @
d4d73dfe
...
...
@@ -50,26 +50,6 @@ spmcq_len(void)
return
UINT_MAX
-
spmcq
.
head
+
1
+
spmcq
.
tail
;
}
#if 0
/*
* this is only approximately correct and could even become negative when values
* get updated while we read them!
*
*/
int SPMCQ_Len(void) {
unsigned l;
do {
l = spmcq_len();
if (l <= spmcq.mask + 1)
break;
VRMB();
} while (1);
return (l);
}
#endif
static
void
spmcq_cleanup
(
void
)
{
...
...
trackrdrd/src/test/test_mq.c
View file @
d4d73dfe
...
...
@@ -90,7 +90,7 @@ static const char
{
const
char
*
err
;
printf
(
"... test worker init
(including connect to ActiveMQ)
\n
"
);
printf
(
"... test worker init
\n
"
);
err
=
MQ_WorkerInit
(
&
worker
);
sprintf
(
errmsg
,
"MQ_WorkerInit: %s"
,
err
);
...
...
trackrdrd/src/test/test_spmcq.c
View file @
d4d73dfe
trackrdrd/src/trackrdrd.c
View file @
d4d73dfe
trackrdrd/src/trackrdrd.h
View file @
d4d73dfe
trackrdrd/src/worker.c
View file @
d4d73dfe
...
...
@@ -59,7 +59,8 @@ static const char* statename[WRK_STATE_E_LIMIT] = {
[
WRK_RUNNING
]
=
"running"
,
[
WRK_WAITING
]
=
"waiting"
,
[
WRK_SHUTTINGDOWN
]
=
"shutting down"
,
[
WRK_EXITED
]
=
"exited"
};
[
WRK_EXITED
]
=
"exited"
};
struct
worker_data_s
{
unsigned
magic
;
...
...
@@ -173,21 +174,16 @@ static void
wrk
->
deqs
++
;
wrk_send
(
amq_worker
,
entry
,
wrk
);
/* should we go to sleep ? */
if
(
SPMCQ_StopWorker
(
running
))
goto
sleep
;
if
(
!
SPMCQ_StopWorker
(
running
))
continue
;
}
sleep:
/* return space before sleeping */
if
(
wrk
->
wrk_nfree
>
0
)
{
DATA_Return_Freelist
(
&
wrk
->
wrk_freelist
,
wrk
->
wrk_nfree
);
wrk
->
wrk_nfree
=
0
;
}
/*
* Queue is empty or we should backoff
*
...
...
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