mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 06:23:34 +08:00
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:
@@ -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
|
||||
********************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user