From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <455B1966.10609@domain.hid> Date: Wed, 15 Nov 2006 14:43:02 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 Subject: Re: [Xenomai-help] pthread_setname_np References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Daniel Schnell Cc: xenomai@xenomai.org Daniel Schnell wrote: > Hi, > > Gilles Chanteperdrix wrote: > > >>I tested pthread_set_name_np with the "switchtest" program on x86 and >>ARM, and it works. Could you run switchtest on your platform and see >>if the information in /proc/xenomai/sched is correct ? > > > The switchtest program works here correctly as well. Looking at the > switchtest code I found out that one has to call this function _after_ > one has actually created the thread with pthread_create() not like > pthread_attr_setXXXX() functions which have to be called before. After > changing the order in my code, it worked there as well. > > Is this behaviour intended ? pthread_set_name_np requires a pthread_t argument, and returns ESRCH if this argument is invalid. It is supposed to be documented at: http://www.xenomai.org/documentation/trunk/html/api/group__posix__thread.html#g414a759c928f7be7ac105980d8e73431 -- Gilles Chanteperdrix