Module Name: src Committed By: pooka Date: Mon Oct 8 18:02:04 UTC 2012
Modified Files: src/lib/librumpuser: rumpuser_pth.c Log Message: call pthread_setname_np() on Linux too. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/librumpuser/rumpuser_pth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/librumpuser/rumpuser_pth.c diff -u src/lib/librumpuser/rumpuser_pth.c:1.8 src/lib/librumpuser/rumpuser_pth.c:1.9 --- src/lib/librumpuser/rumpuser_pth.c:1.8 Fri Jul 27 09:09:05 2012 +++ src/lib/librumpuser/rumpuser_pth.c Mon Oct 8 18:02:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_pth.c,v 1.8 2012/07/27 09:09:05 pooka Exp $ */ +/* $NetBSD: rumpuser_pth.c,v 1.9 2012/10/08 18:02:04 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include "rumpuser_port.h" #if !defined(lint) -__RCSID("$NetBSD: rumpuser_pth.c,v 1.8 2012/07/27 09:09:05 pooka Exp $"); +__RCSID("$NetBSD: rumpuser_pth.c,v 1.9 2012/10/08 18:02:04 pooka Exp $"); #endif /* !lint */ #include <assert.h> @@ -238,9 +238,12 @@ rumpuser_thread_create(void *(*f)(void * } rv = pthread_create(ptidp, &pattr, f, arg); -#ifdef __NetBSD__ +#if defined(__NetBSD__) if (rv == 0 && thrname) pthread_setname_np(ptid, thrname, NULL); +#elif defined(__linux__) + if (rv == 0 && thrname) + pthread_setname_np(ptid, thrname); #endif if (joinable) {