[Issue] Unhandled return value from pthread_setspecific
[Bug] N/A
[Cause] N/A
[Solution] Log on errors.
[Verification] Build commons.
Change-Id: I9994b421626df10a27eef90899dc0645120c765d
#include <dpl/assert.h>
#include <errno.h>
#include <time.h>
+#include <string.h>
namespace // anonymous
{
Assert(This != NULL);
// Set thread specific
- pthread_setspecific(g_threadSpecific.threadSpecific, This);
+ int result = pthread_setspecific(g_threadSpecific.threadSpecific, This);
+
+ if (result!=0)
+ {
+ LogError("Failed to set threadSpecific. Error: " << strerror(result));
+ }
// Enter thread proc
// Do not allow exceptions to hit pthread core