Added NamedLockPattern to BlockingTCPConnector and resolved some warnings and compilation/linker errors.

Reference to '__sync_add_and_fetch' and '__sync_sub_and_fetch' removed for now, since it is glibc version specific.
This commit is contained in:
miha_vitorovic
2011-01-05 09:20:51 +01:00
parent 5ec1adfacb
commit 544fc6bd73
4 changed files with 61 additions and 23 deletions

View File

@@ -66,15 +66,19 @@ void ReferenceCountingLock::release()
int ReferenceCountingLock::increment()
{
//TODO does it really has to be atomic?
//return ++_references;
return __sync_add_and_fetch(&_references,1);
return ++_references;
// commented because linking depends on specific version of glibc library
// on i386 target
//return __sync_add_and_fetch(&_references,1);
}
int ReferenceCountingLock::decrement()
{
//TODO does it really has to be atomic?
//return --_references;
return __sync_sub_and_fetch(&_references,1);
return --_references;
// commented because linking depends on specific version of glibc library
// on i386 target
//return __sync_sub_and_fetch(&_references,1);
}
}}