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)
35
struct
thread_list_entry
36
{
37
CAThread
*
tle_thread
;
38
struct
thread_list_entry
*
tle_next
;
39
};
40
41
typedef
struct
thread_list_entry
thread_list_entry_t
;
42
43
/* Just a simple list implementation to get hold of all created threads */
44
class
CAThreadList
45
{
46
47
public
:
48
CAThreadList
();
49
~CAThreadList
();
50
51
SINT32
put
(
const
CAThread
*
const
thread);
52
SINT32
remove
(
const
CAThread
*
const
thread);
53
56
SINT32
waitAndRemoveAll
();
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
69
UINT32
m_Size
;
70
thread_list_entry_t
*
m_pHead
;
71
CAMutex
*
m_pListLock
;
72
};
73
74
#endif
/*CATHREADLIST_H_*/
75
#endif
//DEBUG
SINT32
signed int SINT32
Definition:
basetypedefs.h:132
UINT32
unsigned int UINT32
Definition:
basetypedefs.h:131
CAMutex
Definition:
CAMutex.hpp:36
CAThread
Definition:
CAThread.hpp:115
CAThreadList
Definition:
CAThreadList.hpp:45
CAThreadList::remove
SINT32 remove(const CAThread *const thread)
Definition:
CAThreadList.cpp:73
CAThreadList::m_Size
UINT32 m_Size
Definition:
CAThreadList.hpp:69
CAThreadList::m_pHead
thread_list_entry_t * m_pHead
Definition:
CAThreadList.hpp:70
CAThreadList::getSize
UINT32 getSize() const
Definition:
CAThreadList.hpp:60
CAThreadList::removeAll
void removeAll()
Definition:
CAThreadList.cpp:152
CAThreadList::~CAThreadList
~CAThreadList()
Definition:
CAThreadList.cpp:47
CAThreadList::showAll
void showAll() const
Definition:
CAThreadList.cpp:129
CAThreadList::waitAndRemoveAll
SINT32 waitAndRemoveAll()
Waits for finishing of all threads in list and removes them.
Definition:
CAThreadList.cpp:172
CAThreadList::CAThreadList
CAThreadList()
Definition:
CAThreadList.cpp:40
CAThreadList::m_pListLock
CAMutex * m_pListLock
Definition:
CAThreadList.hpp:71
CAThreadList::put
SINT32 put(const CAThread *const thread)
Definition:
CAThreadList.cpp:59
thread_list_entry
Definition:
CAThreadList.hpp:36
thread_list_entry::tle_thread
CAThread * tle_thread
Definition:
CAThreadList.hpp:37
thread_list_entry::tle_next
struct thread_list_entry * tle_next
Definition:
CAThreadList.hpp:38
Generated on Sat Jul 22 2023 00:20:12 for Mixe for Privacy and Anonymity in the Internet by
1.9.1