projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release Open vSwitch 1.1.0
[openvswitch]
/
lib
/
lockfile.c
diff --git
a/lib/lockfile.c
b/lib/lockfile.c
index 100440e93614ca92db6255d25f8c09756b474532..771ad70c5d48d68c0ff784af315a455f5c28fa21 100644
(file)
--- a/
lib/lockfile.c
+++ b/
lib/lockfile.c
@@
-29,10
+29,15
@@
#include "hmap.h"
#include "timeval.h"
#include "util.h"
#include "hmap.h"
#include "timeval.h"
#include "util.h"
-
-#define THIS_MODULE VLM_lockfile
#include "vlog.h"
#include "vlog.h"
+VLOG_DEFINE_THIS_MODULE(lockfile);
+
+COVERAGE_DEFINE(lockfile_lock);
+COVERAGE_DEFINE(lockfile_timeout);
+COVERAGE_DEFINE(lockfile_error);
+COVERAGE_DEFINE(lockfile_unlock);
+
struct lockfile {
struct hmap_node hmap_node;
char *name;
struct lockfile {
struct hmap_node hmap_node;
char *name;
@@
-151,7
+156,7
@@
lockfile_postfork(void)
{
struct lockfile *lockfile;
{
struct lockfile *lockfile;
- HMAP_FOR_EACH (lockfile,
struct lockfile,
hmap_node, &lock_table) {
+ HMAP_FOR_EACH (lockfile, hmap_node, &lock_table) {
if (lockfile->fd >= 0) {
VLOG_WARN("%s: child does not inherit lock", lockfile->name);
lockfile_unhash(lockfile);
if (lockfile->fd >= 0) {
VLOG_WARN("%s: child does not inherit lock", lockfile->name);
lockfile_unhash(lockfile);
@@
-171,7
+176,7
@@
lockfile_find(dev_t device, ino_t inode)
{
struct lockfile *lockfile;
{
struct lockfile *lockfile;
- HMAP_FOR_EACH_WITH_HASH (lockfile,
struct lockfile,
hmap_node,
+ HMAP_FOR_EACH_WITH_HASH (lockfile, hmap_node,
lockfile_hash(device, inode), &lock_table) {
if (lockfile->device == device && lockfile->inode == inode) {
return lockfile;
lockfile_hash(device, inode), &lock_table) {
if (lockfile->device == device && lockfile->inode == inode) {
return lockfile;