From aa454620bff8b6c5dcd4e0e379726307ad1918da Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 22 Jan 2007 05:00:29 +0000 Subject: Created Raul namespace. git-svn-id: http://svn.drobilla.net/lad/raul@265 a436a847-0d15-0410-975c-d299462d15a1 --- raul/Thread.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'raul/Thread.h') diff --git a/raul/Thread.h b/raul/Thread.h index 2a7a321..694d463 100644 --- a/raul/Thread.h +++ b/raul/Thread.h @@ -1,11 +1,11 @@ -/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard. +/* This file is part of Raul. Copyright (C) 2007 Dave Robillard. * - * Ingen is free software; you can redistribute it and/or modify it under the + * Raul is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * Raul is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. * @@ -22,6 +22,8 @@ #include #include +namespace Raul { + /** Abstract base class for a thread. * @@ -106,6 +108,7 @@ protected: Thread(const std::string& name="") : _context(0), _name(name), _pthread_exists(false) { pthread_once(&_thread_key_once, thread_key_alloc); + pthread_setspecific(_thread_key, this); } /** Must be called from thread */ @@ -151,4 +154,6 @@ private: }; +} // namespace Raul + #endif // RAUL_THREAD_H -- cgit v1.2.1