We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65e6297 commit e31d0baCopy full SHA for e31d0ba
portable/ThirdParty/GCC/Posix/port.c
@@ -51,9 +51,6 @@
51
*----------------------------------------------------------*/
52
#include "portmacro.h"
53
54
-#ifdef __linux__
55
- #define __USE_GNU
56
-#endif
57
58
#include <errno.h>
59
#include <pthread.h>
@@ -64,6 +61,7 @@
64
61
#include <string.h>
65
62
#include <sys/time.h>
66
63
#include <sys/times.h>
+#include <sys/prctl.h>
67
#include <time.h>
68
#include <unistd.h>
69
@@ -141,7 +139,7 @@ static void prvPortSetCurrentThreadName(char * pxThreadName)
141
139
#ifdef __APPLE__
142
140
pthread_setname_np(pxThreadName);
143
#else
144
- pthread_setname_np(pthread_self(), pxThreadName);
+ prctl( PR_SET_NAME, pxThreadName );
145
#endif
146
}
147
/*-----------------------------------------------------------*/
0 commit comments