Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_setname_np(3) [osf1 man page]

pthread_setname_np(3)					     Library Functions Manual					     pthread_setname_np(3)

NAME
pthread_setname_np - Changes the object name in the thread object for an existing thread. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_setname_np( pthread_thread_t thread, const char *name, void *mbz); PARAMETERS
Thread object whose object name is to be changed. Object name value to copy into the thread object. Reserved for future use. The value must be zero (0). DESCRIPTION
This routine changes the object name in the thread object specified by thread to the value specified by name. To set an existing thread's object name, call this routine after creating the thread. However, with this approach your program must account for the possibility that the target thread has already exited or has been canceled before this routine is called. The object name is a C language string and provides an identifier that is meaningful to a person debugging a DECthreads-based multithreaded application. The maximum number of characters in the object name is 31. This routine contrasts with pthread_attr_setname_np, which changes the object name attribute in a thread attributes object that is used to create a new thread. RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The thread specified by thread does not exist. The length in characters of name exceeds 31. Insufficient memory exists to create a copy of the object name string. ERRORS
None RELATED INFORMATION
Functions: pthread_getname_np(3), pthread_attr_setname_np(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_setname_np(3)

Check Out this Related Man Page

pthread_key_setname_np(3)				     Library Functions Manual					 pthread_key_setname_np(3)

NAME
pthread_key_setname_np - Change the object name in a thread-specific data key object. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_key_setname_np( pthread_key_t *key, const char *name, void *mbz); PARAMETERS
Address of the thread-specific data key object whose object name is to be changed. Object name value to copy into the thread-specific data key object. Reserved for future use. The value must be zero (0). DESCRIPTION
This routine changes the object name in the thread-specific data key object specified by key to the value specified by name. To set a new thread-specific data key object's object name, call this routine immediately after initializing the key object. The object name is a C language string and provides an identifier that is meaningful to a person debugging a multithreaded application. The maximum number of characters in the object name is 31. RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The value specified by key is not a valid key, or the length in characters of name exceeds 31. Insufficient memory exists to create a copy of the object name string. ERRORS
None RELATED INFORMATION
Functions: pthread_key_getname_np(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_key_setname_np(3)
Man Page

8 More Discussions You Might Find Interesting

1. Programming

forking within a thread

Is it safe to call fork+exec in a multithreaded application. Because In my multithreaded application, I need to execute another program in each thread. I am using solaris 10. Any suggestions pls. (2 Replies)
Discussion started by: axes
2 Replies

2. Shell Programming and Scripting

Cron Jobs for FTP download

Dear All, Please to be inform you,I have posted one thread on this forum last 5 days back. I was not getting suggestions for my thread. So i am creating a new thread with detailed of my R&D. I am new in Shell Scripts, Perl and Cron Jobs. I have one requirement in Cron jobs for FTP Download.... (5 Replies)
Discussion started by: moorthygs
5 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Cannot post thread or activate account

Please help i cannot post a new thread or activate my account i have tried everything!!!:mad: (1 Reply)
Discussion started by: pure_jax
1 Replies

4. Programming

leak memory when thread exit

In our concurrent tcp server program, once the connection comes, the program create a thread to process acception. When the client exit, the server closed socket and the thread exited, the problem is the memory can not release normally. The code looks like the followings: main() { ... (1 Reply)
Discussion started by: Frank2004
1 Replies

5. Programming

Thread synchronisation

hi, i have to do a program with following condition. please help me to write the program. conditions-i have to create a thread with handle called first and it should call the member function(may do anything lik print anything) of a class called thread1 and for example let take that this first... (5 Replies)
Discussion started by: senthil.march
5 Replies

6. Forum Support Area for Unregistered Users & Account Problems

My userid is weichanghe2000 But I have no any permission

Because I cannot continue replying to you in previous thread, I have to create a new thread, Please forgive me. My userid is weichanghe2000, I want to create a new thread in "Shell Programming and Scripting", But I cannot do any operation, Please help me solve this problem. I am looking... (3 Replies)
Discussion started by: Unregistered
3 Replies

7. Forum Support Area for Unregistered Users & Account Problems

Unable to create new thread

Hi. I registered, but when trying to post, I get ... "Sorry, you do not have enough Bits to post a new thread" Google & Forum search showed some hits, but no solution. Please advide. Thanks! (1 Reply)
Discussion started by: gehe
1 Replies

8. UNIX for Beginners Questions & Answers

Finding and renaming files with exceptions

Hello all, I am a new ubuntu user (have to use it for work) and I am trying to learn and familiarize myself with commands that I will be using frequently. I would like some help in how I can get a list of all files with certain keywords in the filename. For example, I have a directory... (8 Replies)
Discussion started by: azurite
8 Replies