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 <sys/types.h>
29
30#include "storage/Utils/Exception.h"
31
32
33namespace storage
34{
35
39 class LockException : public Exception
40 {
41
42 public:
43
44 LockException(pid_t locker_pid);
45
52 pid_t get_locker_pid() const;
53
54 private:
55
56 const pid_t locker_pid;
57
58 };
59
60}
61
62#endif
Exception(LogLevel log_level=LogLevel::ERROR)
Default constructor.
pid_t get_locker_pid() const
pid of one of the process holding a lock.
The storage namespace.
Definition Actiongraph.h:40