Mixe for Privacy and Anonymity in the Internet
CAThreadList.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) The JAP-Team, JonDos GmbH
3 
4 All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
7 
8  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright notice,
10  this list of conditions and the following disclaimer in the documentation and/or
11  other materials provided with the distribution.
12  * Neither the name of the University of Technology Dresden, Germany, nor the name of
13  the JonDos GmbH, nor the names of their contributors may be used to endorse or
14  promote products derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
20 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 #ifndef CATHREADLIST_H_
29 #define CATHREADLIST_H_
30 
34 #if !defined(ONLY_LOCAL_PROXY)
36 {
39 };
40 
42 
43 /* Just a simple list implementation to get hold of all created threads */
45 {
46 
47 public:
48  CAThreadList();
49  ~CAThreadList();
50 
51  SINT32 put(const CAThread* const thread);
52  SINT32 remove(const CAThread* const thread);
53 
57 
58  //CAThread* get(CAThread *thread);
59  void showAll() const;
60  UINT32 getSize() const
61  {
62  return m_Size;
63  }
64 
65 private:
66 
67  void removeAll();
68 
72 };
73 
74 #endif /*CATHREADLIST_H_*/
75 #endif //DEBUG
signed int SINT32
Definition: basetypedefs.h:132
unsigned int UINT32
Definition: basetypedefs.h:131
SINT32 remove(const CAThread *const thread)
thread_list_entry_t * m_pHead
UINT32 getSize() const
void showAll() const
SINT32 waitAndRemoveAll()
Waits for finishing of all threads in list and removes them.
CAMutex * m_pListLock
SINT32 put(const CAThread *const thread)
CAThread * tle_thread
struct thread_list_entry * tle_next