void NSSetList()\r
{\r
NS_LOG(DEBUG, "NSSetList - IN");\r
- pthread_mutex_init(&NSCacheMutex, NULL);\r
+\r
+ pthread_mutexattr_init(&NSCacheMutexAttr);\r
+ int pthreadResult = pthread_mutexattr_settype(&NSCacheMutexAttr, PTHREAD_MUTEX_RECURSIVE);\r
+ pthread_mutex_init(&NSCacheMutex, &NSCacheMutexAttr);\r
+\r
NSInitSubscriptionList();\r
NSInitMessageList();\r
NS_LOG(DEBUG, "NSSetList - OUT");\r
newList->head = newList->tail = NULL;\r
\r
pthread_mutex_unlock(&NSCacheMutex);\r
-\r
NS_LOG(DEBUG, "NSCacheCreate");\r
\r
return newList;\r
return NS_ERROR;\r
}\r
\r
- pthread_mutex_unlock(&NSCacheMutex);\r
NSCacheElement * it = NSStorageRead(list, id);\r
- pthread_mutex_lock(&NSCacheMutex);\r
\r
if (it)\r
{\r
NS_LOG(DEBUG, "Type is SUBSCRIBER");\r
\r
NSCacheSubData * subData = (NSCacheSubData *) newObj->data;\r
-\r
- pthread_mutex_unlock(&NSCacheMutex);\r
NSCacheElement * it = NSStorageRead(list, subData->id);\r
- pthread_mutex_lock(&NSCacheMutex);\r
\r
if (it)\r
{\r
NS_LOG(DEBUG, "Type is MESSAGE");\r
\r
NSCacheMsgData * msgData = (NSCacheMsgData *) newObj->data;\r
-\r
- pthread_mutex_unlock(&NSCacheMutex);\r
NSCacheElement * it = NSStorageRead(list, msgData->id);\r
- pthread_mutex_lock(&NSCacheMutex);\r
+\r
if (it)\r
{\r
NSCacheMsgData * itData = (NSCacheMsgData *) it->data;\r