libstorage-ng
Loading...
Searching...
No Matches
Lock.h
1/*
2 * Copyright (c) [2004-2009] Novell, Inc.
3 * Copyright (c) 2018 SUSE LLC
4 *
5 * All Rights Reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of version 2 of the GNU General Public License as published
9 * by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, contact Novell, Inc.
18 *
19 * To contact Novell about this file by physical or electronic mail, you may
20 * find current contact information at www.novell.com.
21 */
22
23
24#ifndef STORAGE_LOCK_H
25#define STORAGE_LOCK_H
26
27
28#include <unistd.h>
29#include <sys/types.h>
30
31#include "storage/Utils/Exception.h"
32
33
34namespace storage
35{
36
40 class LockException : public Exception
41 {
42
43 public:
44
45 LockException(pid_t locker_pid);
46
53 pid_t get_locker_pid() const;
54
55 private:
56
57 const pid_t locker_pid;
58
59 };
60
61}
62
63#endif
Base class for storage exceptions.
Definition Exception.h:114
Exception indicating that getting the lock failed.
Definition Lock.h:41
pid_t get_locker_pid() const
pid of one of the process holding a lock.
The storage namespace.
Definition Actiongraph.h:40