Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lyskom-server-ceder-1616-generations-topgit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
4ef39fe8
Commit
4ef39fe8
authored
33 years ago
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
Fixade div. typos.
parent
e9e58f91
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/server/cache-node.c
+7
-5
7 additions, 5 deletions
src/server/cache-node.c
with
7 additions
and
5 deletions
src/server/cache-node.c
+
7
−
5
View file @
4ef39fe8
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* Used in diskomd.
* Used in diskomd.
*/
*/
static
char
*
rcsid
=
"$Id: cache-node.c,v 0.
5
1991/0
8/28
0
2
:2
2:01
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: cache-node.c,v 0.
6
1991/0
9/05
0
8
:2
3:42
ceder Exp $"
;
#include
<stdio.h>
#include
<stdio.h>
...
@@ -118,12 +118,11 @@ static Cache_node *
...
@@ -118,12 +118,11 @@ static Cache_node *
alloc_cache_node
(
Cache_node_mcb
*
control
)
alloc_cache_node
(
Cache_node_mcb
*
control
)
{
{
Cache_node
*
c
;
Cache_node
*
c
;
Cache_node_block
*
new_block
;
if
(
control
->
last_block
==
NULL
if
(
control
->
last_block
==
NULL
||
control
->
last_block
->
next_free
>=
control
->
mcb_size
)
||
control
->
last_block
->
next_free
>=
control
->
mcb_size
)
{
{
Cache_node_block
*
new_block
;
new_block
=
alloc_cache_node_block
(
control
->
mcb_size
);
new_block
=
alloc_cache_node_block
(
control
->
mcb_size
);
new_block
->
link
=
control
->
last_block
;
new_block
->
link
=
control
->
last_block
;
control
->
last_block
=
new_block
;
control
->
last_block
=
new_block
;
...
@@ -150,8 +149,9 @@ create_cache_node (Cache_node_mcb *control,
...
@@ -150,8 +149,9 @@ create_cache_node (Cache_node_mcb *control,
u_long
key
)
u_long
key
)
{
{
if
(
key
>=
control
->
lookup_table_size
)
if
(
key
>=
control
->
lookup_table_size
)
restart_kom
(
"ERROR:
set
_cache_node(%lu, %lu
, value
): "
restart_kom
(
"ERROR:
create
_cache_node(%lu, %lu): "
"lookup_table_size = %lu
\n
"
,
"lookup_table_size = %lu
\n
"
,
(
u_long
)
control
,
key
,
control
->
lookup_table_size
);
control
->
lookup_table_size
);
control
->
lookup_table
[
key
]
=
alloc_cache_node
(
control
);
control
->
lookup_table
[
key
]
=
alloc_cache_node
(
control
);
...
@@ -162,8 +162,9 @@ zero_init_cache_node (Cache_node_mcb *control,
...
@@ -162,8 +162,9 @@ zero_init_cache_node (Cache_node_mcb *control,
u_long
key
)
u_long
key
)
{
{
if
(
key
>=
control
->
lookup_table_size
)
if
(
key
>=
control
->
lookup_table_size
)
restart_kom
(
"ERROR:
se
t_cache_node(%lu, %lu
, value
): "
restart_kom
(
"ERROR:
zero_ini
t_cache_node(%lu, %lu): "
"lookup_table_size = %lu
\n
"
,
"lookup_table_size = %lu
\n
"
,
(
u_long
)
control
,
key
,
control
->
lookup_table_size
);
control
->
lookup_table_size
);
control
->
lookup_table
[
key
]
=
NULL
;
control
->
lookup_table
[
key
]
=
NULL
;
...
@@ -185,6 +186,7 @@ set_mru(Cache_node_mcb *mcb,
...
@@ -185,6 +186,7 @@ set_mru(Cache_node_mcb *mcb,
unlink_lru
(
node
,
&
mcb
->
lru
,
&
mcb
->
mru
);
unlink_lru
(
node
,
&
mcb
->
lru
,
&
mcb
->
mru
);
insert_mru
(
node
,
&
mcb
->
lru
,
&
mcb
->
mru
);
insert_mru
(
node
,
&
mcb
->
lru
,
&
mcb
->
mru
);
}
}
static
void
static
void
free_cache_node_block
(
Cache_node_block
*
block
)
free_cache_node_block
(
Cache_node_block
*
block
)
{
{
...
...
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