Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpuser call pthread_setname_np() on Linux too.
details: https://anonhg.NetBSD.org/src/rev/950733c38579
branches: trunk
changeset: 781939:950733c38579
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Oct 08 18:02:04 2012 +0000
description:
call pthread_setname_np() on Linux too.
diffstat:
lib/librumpuser/rumpuser_pth.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r aad24cdf94a6 -r 950733c38579 lib/librumpuser/rumpuser_pth.c
--- a/lib/librumpuser/rumpuser_pth.c Mon Oct 08 17:56:59 2012 +0000
+++ b/lib/librumpuser/rumpuser_pth.c Mon Oct 08 18:02:04 2012 +0000
@@ -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 @@
}
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) {
Home |
Main Index |
Thread Index |
Old Index