diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-02-23 09:58:44 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-02-23 09:58:44 +0100 |
commit | 4dcc14fa7e853546d68a48cd9d5f81b69c25bc1f (patch) | |
tree | 58f8531af5e54784fca54c72d414e144b5e18373 /sal/osl/unx | |
parent | fb4f853ff6e53f3537e8e5ff2b488d039d175a16 (diff) | |
parent | ea713649e558dcec291302bffd00b148a96e33a8 (diff) |
debuglevels: merged to-be-m101
Diffstat (limited to 'sal/osl/unx')
-rw-r--r-- | sal/osl/unx/pipe.c | 2 | ||||
-rw-r--r-- | sal/osl/unx/thread.c | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/sal/osl/unx/pipe.c b/sal/osl/unx/pipe.c index ede4cd7e074f..069ea9990951 100644 --- a/sal/osl/unx/pipe.c +++ b/sal/osl/unx/pipe.c @@ -486,7 +486,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe, (sal_Char*)pBuffer, BytesToRead, 0); - if ( nRet <= 0 ) + if ( nRet < 0 ) { OSL_TRACE("osl_receivePipe failed : %i '%s'",nRet,strerror(errno)); } diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index fe53915b792f..18c4b033daf7 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -34,6 +34,10 @@ #include <rtl/textenc.h> #endif +#if defined LINUX +#include <sys/prctl.h> +#endif + /**************************************************************************** * @@@ TODO @@@ * @@ -566,6 +570,18 @@ void SAL_CALL osl_yieldThread() sched_yield(); } +void SAL_CALL osl_setThreadName(char const * name) { +#if defined LINUX + if (prctl(PR_SET_NAME, (unsigned long) name, 0, 0, 0) != 0) { + OSL_TRACE( + "%s prctl(PR_SET_NAME) failed with errno %d", OSL_LOG_PREFIX, + errno); + } +#else + (void) name; +#endif +} + /*****************************************************************************/ /* osl_getThreadIdentifier @@@ see TODO @@@ */ /*****************************************************************************/ |