Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eventfd.hpp
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Contact: Jan Olszak <j.olszak@samsung.com>
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License
17 */
18 
25 #ifndef COMMON_UTILS_EVENTFD_HPP
26 #define COMMON_UTILS_EVENTFD_HPP
27 
28 namespace utils {
29 
30 class EventFD {
31 public:
32 
33  EventFD();
34  virtual ~EventFD();
35 
36  EventFD(const EventFD& eventfd) = delete;
37  EventFD& operator=(const EventFD&) = delete;
38 
42  int getFD() const;
43 
47  void send();
48 
53  void receive();
54 
55 private:
56  int mFD;
57 };
58 
59 } // namespace utils
60 
61 #endif // COMMON_UTILS_EVENTFD_HPP
void receive()
Receives the signal.
Definition: eventfd.cpp:65
EventFD()
Definition: eventfd.cpp:39
Definition: eventfd.hpp:30
EventFD & operator=(const EventFD &)=delete
int getFD() const
Definition: eventfd.cpp:54
virtual ~EventFD()
Definition: eventfd.cpp:49
void send()
Send an event of a given value.
Definition: eventfd.cpp:59
int mFD
Definition: eventfd.hpp:56