summaryrefslogtreecommitdiff
path: root/ace/Free_List.cpp
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-06 08:55:05 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-06 08:55:05 +0000
commit285d23929d0654cd39320e957a923cbac0636571 (patch)
treef945831a6e1870d4674960671d6623c238fe5204 /ace/Free_List.cpp
parentee9ab319d5a2a03ff5b24c14b6c61cfff33b9e77 (diff)
downloadATCD-285d23929d0654cd39320e957a923cbac0636571.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Free_List.cpp')
-rw-r--r--ace/Free_List.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/ace/Free_List.cpp b/ace/Free_List.cpp
index f9400f37820..f6a67f3ff12 100644
--- a/ace/Free_List.cpp
+++ b/ace/Free_List.cpp
@@ -1,3 +1,5 @@
+// $Id$
+
#if !defined (ACE_FREE_LIST_C)
#define ACE_FREE_LIST_C
@@ -9,7 +11,7 @@
// Empty constructor
-template <class T>
+template <class T>
ACE_Free_List<T>::~ACE_Free_List (void)
{
// Nothing
@@ -19,11 +21,11 @@ ACE_Free_List<T>::~ACE_Free_List (void)
// (<prealloc>), a low and high water mark (<lwm> and <hwm>) and an
// increment value (<inc>)
-template <class T, class ACE_LOCK>
+template <class T, class ACE_LOCK>
ACE_Locked_Free_List<T, ACE_LOCK>::ACE_Locked_Free_List (int mode,
- size_t prealloc,
- size_t lwm,
- size_t hwm,
+ size_t prealloc,
+ size_t lwm,
+ size_t hwm,
size_t inc)
: mode_ (mode),
free_list_ (0),
@@ -37,7 +39,7 @@ ACE_Locked_Free_List<T, ACE_LOCK>::ACE_Locked_Free_List (int mode,
// Destructor - removes all the elements from the free_list
-template <class T, class ACE_LOCK>
+template <class T, class ACE_LOCK>
ACE_Locked_Free_List<T, ACE_LOCK>::~ACE_Locked_Free_List (void)
{
if (this->mode_ != ACE_PURE_FREE_LIST)
@@ -51,11 +53,9 @@ ACE_Locked_Free_List<T, ACE_LOCK>::~ACE_Locked_Free_List (void)
// Allocates <n> extra nodes for the freelist
-template <class T, class ACE_LOCK> void
+template <class T, class ACE_LOCK> void
ACE_Locked_Free_List<T, ACE_LOCK>::alloc (size_t n)
{
- ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_));
-
for (; n > 0; n--)
{
T *temp;
@@ -68,11 +68,9 @@ ACE_Locked_Free_List<T, ACE_LOCK>::alloc (size_t n)
// Removes and frees <n> nodes from the freelist.
-template <class T, class ACE_LOCK> void
+template <class T, class ACE_LOCK> void
ACE_Locked_Free_List<T, ACE_LOCK>::dealloc (size_t n)
{
- ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_));
-
for (; this->free_list_ != 0 && n > 0;
n--)
{