Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Verlässliche Systemsoftware
projects
osv
Commits
a6b1a2b6
Commit
a6b1a2b6
authored
12 years ago
by
Guy Zana
Browse files
Options
Downloads
Patches
Plain Diff
Go back from cmutex to rwlock in if_llatbl.h
parent
dbbc8d29
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
bsd/sys/net/if_llatbl.h
+2
-22
2 additions, 22 deletions
bsd/sys/net/if_llatbl.h
with
2 additions
and
22 deletions
bsd/sys/net/if_llatbl.h
+
2
−
22
View file @
a6b1a2b6
...
...
@@ -24,10 +24,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include
<osv/mutex.h>
#include
<bsd/porting/netport.h>
#include
<bsd/porting/callout.h>
#include
<bsd/porting/rwlock.h>
#include
<sys/cdefs.h>
...
...
@@ -46,21 +46,12 @@ struct rt_addrinfo;
struct
llentry
;
LIST_HEAD
(
llentries
,
llentry
);
#if 0
extern
struct
rwlock
lltable_rwlock
;
#define LLTABLE_RLOCK() rw_rlock(&lltable_rwlock)
#define LLTABLE_RUNLOCK() rw_runlock(&lltable_rwlock)
#define LLTABLE_WLOCK() rw_wlock(&lltable_rwlock)
#define LLTABLE_WUNLOCK() rw_wunlock(&lltable_rwlock)
#define LLTABLE_LOCK_ASSERT() rw_assert(&lltable_rwlock, RA_LOCKED)
#else
extern
struct
cmutex
lltable_mtxlock
;
#define LLTABLE_RLOCK() mutex_lock(&lltable_mtxlock)
#define LLTABLE_RUNLOCK() mutex_unlock(&lltable_mtxlock)
#define LLTABLE_WLOCK() mutex_lock(&lltable_mtxlock)
#define LLTABLE_WUNLOCK() mutex_unlock(&lltable_mtxlock)
#define LLTABLE_LOCK_ASSERT() do{}while(0)
#endif
/*
* Code referencing llentry must at least hold
...
...
@@ -68,7 +59,7 @@ extern struct cmutex lltable_mtxlock;
*/
struct
llentry
{
LIST_ENTRY
(
llentry
)
lle_next
;
struct
cmutex
lle_lock
;
struct
rwlock
lle_lock
;
struct
lltable
*
lle_tbl
;
struct
llentries
*
lle_head
;
void
(
*
lle_free
)(
struct
lltable
*
,
struct
llentry
*
);
...
...
@@ -100,7 +91,6 @@ struct llentry {
/* NB: struct sockaddr must immediately follow */
};
#if 0
#define LLE_WLOCK(lle) rw_wlock(&(lle)->lle_lock)
#define LLE_RLOCK(lle) rw_rlock(&(lle)->lle_lock)
#define LLE_WUNLOCK(lle) rw_wunlock(&(lle)->lle_lock)
...
...
@@ -110,16 +100,6 @@ struct llentry {
#define LLE_LOCK_INIT(lle) rw_init_flags(&(lle)->lle_lock, "lle", RW_DUPOK)
#define LLE_LOCK_DESTROY(lle) rw_destroy(&(lle)->lle_lock)
#define LLE_WLOCK_ASSERT(lle) rw_assert(&(lle)->lle_lock, RA_WLOCKED)
#else
#define LLE_WLOCK(lle) mutex_lock(&(lle)->lle_lock)
#define LLE_RLOCK(lle) mutex_lock(&(lle)->lle_lock)
#define LLE_WUNLOCK(lle) mutex_unlock(&(lle)->lle_lock)
#define LLE_RUNLOCK(lle) mutex_unlock(&(lle)->lle_lock)
#define LLE_DOWNGRADE(lle) do{}while(0)
#define LLE_LOCK_INIT(lle) bzero(&(lle)->lle_lock, sizeof(struct cmutex))
#define LLE_LOCK_DESTROY(lle) do{}while(0)
#define LLE_WLOCK_ASSERT(lle) do{}while(0)
#endif
#define LLE_IS_VALID(lle) (((lle) != NULL) && ((lle) != (void *)-1))
...
...
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