git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added keepalive setter.
[stg.git]
/
projects
/
stargazer
/
actions.inl.h
diff --git
a/projects/stargazer/actions.inl.h
b/projects/stargazer/actions.inl.h
index 37c7e86e71ef78c30d0e9b3be30121464c44537a..b5b3f8a5a20090977ed3f3f2cd43bb8aad5929f4 100644
(file)
--- a/
projects/stargazer/actions.inl.h
+++ b/
projects/stargazer/actions.inl.h
@@
-3,7
+3,7
@@
#include <algorithm>
#include <algorithm>
-#include "stg
_
locker.h"
+#include "stg
/
locker.h"
// Polymorphick action invocation
template <class ACTIVE_CLASS, typename DATA_TYPE>
// Polymorphick action invocation
template <class ACTIVE_CLASS, typename DATA_TYPE>
@@
-18,7
+18,7
@@
ACTIONS_LIST::ACTIONS_LIST()
: mutex()
{
pthread_mutex_init(&mutex, NULL);
: mutex()
{
pthread_mutex_init(&mutex, NULL);
-}
;
+}
// Delete all actions before deleting list
inline
// Delete all actions before deleting list
inline
@@
-26,7
+26,7
@@
ACTIONS_LIST::~ACTIONS_LIST()
{
{
{
{
- STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+ STG_LOCKER lock(&mutex);
parent::iterator it(parent::begin());
while (it != parent::end())
parent::iterator it(parent::begin());
while (it != parent::end())
@@
-36,56
+36,56
@@
ACTIONS_LIST::~ACTIONS_LIST()
}
pthread_mutex_destroy(&mutex);
}
pthread_mutex_destroy(&mutex);
-}
;
+}
inline
ACTIONS_LIST::parent::iterator ACTIONS_LIST::begin()
{
inline
ACTIONS_LIST::parent::iterator ACTIONS_LIST::begin()
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
return parent::begin();
return parent::begin();
-}
;
+}
inline
ACTIONS_LIST::parent::iterator ACTIONS_LIST::end()
{
inline
ACTIONS_LIST::parent::iterator ACTIONS_LIST::end()
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
return parent::end();
return parent::end();
-}
;
+}
inline
ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::begin() const
{
inline
ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::begin() const
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
return parent::begin();
return parent::begin();
-}
;
+}
inline
ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::end() const
{
inline
ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::end() const
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
return parent::end();
return parent::end();
-}
;
+}
inline
bool ACTIONS_LIST::empty() const
{
inline
bool ACTIONS_LIST::empty() const
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
return parent::empty();
return parent::empty();
-}
;
+}
inline
size_t ACTIONS_LIST::size() const
{
inline
size_t ACTIONS_LIST::size() const
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
return parent::size();
return parent::size();
-}
;
+}
inline
void ACTIONS_LIST::swap(ACTIONS_LIST & list)
{
inline
void ACTIONS_LIST::swap(ACTIONS_LIST & list)
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
parent::swap(list);
parent::swap(list);
-}
;
+}
template <class ACTIVE_CLASS, typename DATA_TYPE>
inline
template <class ACTIVE_CLASS, typename DATA_TYPE>
inline
@@
-93,19
+93,19
@@
void ACTIONS_LIST::Enqueue(ACTIVE_CLASS & ac,
typename ACTOR<ACTIVE_CLASS, DATA_TYPE>::TYPE a,
DATA_TYPE d)
{
typename ACTOR<ACTIVE_CLASS, DATA_TYPE>::TYPE a,
DATA_TYPE d)
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
push_back(new ACTION<ACTIVE_CLASS, DATA_TYPE>(ac, a, d));
}
inline
void ACTIONS_LIST::InvokeAll()
{
push_back(new ACTION<ACTIVE_CLASS, DATA_TYPE>(ac, a, d));
}
inline
void ACTIONS_LIST::InvokeAll()
{
-STG_LOCKER lock(&mutex
, __FILE__, __LINE__
);
+STG_LOCKER lock(&mutex);
std::for_each(
parent::begin(),
parent::end(),
std::mem_fun(&BASE_ACTION::Invoke)
);
std::for_each(
parent::begin(),
parent::end(),
std::mem_fun(&BASE_ACTION::Invoke)
);
-}
;
+}
#endif
#endif