Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_external_libnl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
LMODroid
platform_external_libnl
Commits
3ed1f9ab
Commit
3ed1f9ab
authored
12 years ago
by
Thomas Graf
Browse files
Options
Downloads
Patches
Plain Diff
cache: Hold cache reference while a cache is being provided
Signed-off-by:
Thomas Graf
<
tgraf@suug.ch
>
parent
c658a6ee
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/cache_mngt.c
+6
-2
6 additions, 2 deletions
lib/cache_mngt.c
with
6 additions
and
2 deletions
lib/cache_mngt.c
+
6
−
2
View file @
3ed1f9ab
...
...
@@ -217,8 +217,10 @@ void nl_cache_mngt_provide(struct nl_cache *cache)
ops
=
cache_ops_lookup_for_obj
(
cache
->
c_ops
->
co_obj_ops
);
if
(
!
ops
)
BUG
();
else
else
{
nl_cache_get
(
cache
);
ops
->
co_major_cache
=
cache
;
}
}
/**
...
...
@@ -236,8 +238,10 @@ void nl_cache_mngt_unprovide(struct nl_cache *cache)
ops
=
cache_ops_lookup_for_obj
(
cache
->
c_ops
->
co_obj_ops
);
if
(
!
ops
)
BUG
();
else
if
(
ops
->
co_major_cache
==
cache
)
else
if
(
ops
->
co_major_cache
==
cache
)
{
nl_cache_free
(
ops
->
co_major_cache
);
ops
->
co_major_cache
=
NULL
;
}
}
struct
nl_cache
*
__nl_cache_mngt_require
(
const
char
*
name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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