Add interfaces to support getting/setting of thread/task names

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4658 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-04-26 15:00:35 +00:00
parent 414af0aef2
commit 305cf084d4
10 changed files with 296 additions and 9 deletions
+12
View File
@@ -136,6 +136,18 @@
#define PTHREAD_BARRIER_SERIAL_THREAD 0x1000
/* Definitions to map some non-standard, BSD thread management interfaces to
* the non-standard Linux-like prctl() interface. Since these are simple
* mappings to prctl, they will return 0 sucess and -1 on failure with the
* err number in errno. This is an inconsistency with out pthread interfaces.
*/
#define pthread_setname_np(thread, name) \
prctl((int)PR_SET_NAME, (char*)name, (int)thread)
#define pthread_getname_np(thread, name) \
prctl((int)PR_GET_NAME, (char*)name, (int)thread)
/********************************************************************************
* Global Type Declarations
********************************************************************************/