X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fserver.h;h=e0738500f7e14c6cc3b2e9fdec3fe76eb8e7f7e9;hb=a76150b18b28addfc39f8900a74c2eceaf8c69da;hp=a9285f79ee08e6b25be9d6bb0f8ebf2149639b74;hpb=da897f41cd795e325ec5ce773a70a819100bd26e;p=openvswitch diff --git a/ovsdb/server.h b/ovsdb/server.h index a9285f79..e0738500 100644 --- a/ovsdb/server.h +++ b/ovsdb/server.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011 Nicira Networks +/* Copyright (c) 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,9 +39,9 @@ struct ovsdb_lock_waiter *ovsdb_session_get_lock_waiter( * A lock always has one or more "lock waiters" kept on a list. The waiter at * the head of the list owns the lock. */ struct ovsdb_lock { + struct hmap_node hmap_node; /* In ovsdb_server's "locks" hmap. */ struct ovsdb_server *server; /* The containing server. */ char *name; /* Unique name. */ - struct hmap_node hmap_node; /* In ovsdb_server's "locks" hmap. */ struct list waiters; /* Contains "struct ovsdb_lock_waiter"s. */ }; @@ -55,14 +55,14 @@ enum ovsdb_lock_mode { /* A session's request for a database lock. */ struct ovsdb_lock_waiter { + struct hmap_node session_node; /* In ->session->locks's hmap. */ + struct ovsdb_lock *lock; /* The lock being waited for. */ + enum ovsdb_lock_mode mode; char *lock_name; - struct ovsdb_lock *lock; /* The lock being waited for. */ - struct list lock_node; /* In ->lock->waiters's list. */ - struct ovsdb_session *session; - struct hmap_node session_node; /* In ->session->locks's hmap. */ + struct list lock_node; /* In ->lock->waiters's list. */ }; struct ovsdb_session *ovsdb_lock_waiter_remove(struct ovsdb_lock_waiter *);