lib/timeval: don't forget to initialize a rwlock
authorYAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Mon, 9 Sep 2013 06:56:23 +0000 (15:56 +0900)
committerBen Pfaff <blp@nicira.com>
Mon, 9 Sep 2013 16:53:26 +0000 (09:53 -0700)
Commit 31ef9f5178 (timeval: Remove CACHE_TIME scheme.) removed
initialization of a rwlock which is still used for some operations.
This restores it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/timeval.c

index 37b4353..3262397 100644 (file)
@@ -76,6 +76,7 @@ init_clock(struct clock *c, clockid_t id)
 {
     memset(c, 0, sizeof *c);
     c->id = id;
+    ovs_rwlock_init(&c->rwlock);
     xclock_gettime(c->id, &c->cache);
 }