cheshirekow  v0.1.0
condition_attr.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of cpp-pthreads.
5  *
6  * cpp-pthreads is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * cpp-pthreads is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with cpp-pthreads. If not, see <http://www.gnu.org/licenses/>.
18  */
27 #ifndef CPP_PTHREADS_CONDITIONATTR_H_
28 #define CPP_PTHREADS_CONDITIONATTR_H_
29 
30 #include <pthread.h>
31 
32 #include <cstdarg>
33 #include <ctime>
34 
35 #include <cpp_pthreads/attr.h>
36 #include <cpp_pthreads/condition.h>
37 #include <cpp_pthreads/enums.h>
38 
39 namespace pthreads {
40 
44 
46 extern const Access<Condition, Clock> CLOCK;
47 
50 
53 template<>
55  typedef pthread_condattr_t type;
56 };
57 
58 }
59 
60 #endif // CONDATTR_H_
TypeWrap< clockid_t, 0 > Clock
A unique type which acts just like clockid_t but is distinct in the eyes of the compiler.
const Access< Condition, Clock > CLOCK
provides access to the clock field of a pthread_condrattr_t
template used to resolve the pthreads_xxx_t object corresponding to the Attr<Base> object ...
Definition: attr.h:42
Provides a unique type that acts like a native type.
Definition: attr.h:261
const Access< Condition, PShared > C_PSHARED
provides access to the pshared field of a pthread_condrattr_t
Allows multiple threads to wait until a condition is satisfied.
Definition: condition.h:44
access delegate, an object which can access an attribute value of an attribute object ...
Definition: attr.h:37