id summary reporter owner description type status priority milestone component version resolution keywords cc device_name 295 [Patch] Name threads to ease debugging adi Hi!\r\n\r\nAccording to http://0pointer.de/blog/projects/name-your-threads.html, it's possible to give names to pthreads.\r\n\r\nThis could be especially helpful in debugging sessions, either to find the corresponding RTPRIOs or even later to discover where things go wrong. gdb support for thread names is on its way.\r\n\r\nglibc has recently added the corresponding pthread_setname_np and pthread_getname_np functions, however, this functionaly won't be available for endusers anytime soon, so we have to stick to prctl instead.\r\n\r\nThe attached patch names the FFADO threads. This is the output *without* the patch:\r\n\r\n{{{\r\nadi@hex:/root/ffado-trunk/libffado$ cat /proc/`pgrep jackd`/task/*/comm\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\njackd\r\n}}}\r\n\r\nAnd here now the result with the patch applied:\r\n\r\n{{{\r\nadi@hex:/root/ffado-trunk/libffado$ cat /proc/`pgrep jackd`/task/*/comm\r\njackd\r\njackd\r\njackd\r\njackd\r\nWDGHBT\r\nWDGCHK\r\nBUSRST\r\nARMSTD\r\nARMRT\r\nCTRHLP\r\nISOXMT\r\nISORCV\r\njackd\r\njackd\r\n}}}\r\n\r\nLooks useful, isn't it? ;) enhancement closed trivial FFADO 2.1 generic FFADO SVN (trunk) fixed