From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- libcult/cult/sched/thread.hxx | 86 ------------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 libcult/cult/sched/thread.hxx (limited to 'libcult/cult/sched/thread.hxx') diff --git a/libcult/cult/sched/thread.hxx b/libcult/cult/sched/thread.hxx deleted file mode 100644 index 49d6225..0000000 --- a/libcult/cult/sched/thread.hxx +++ /dev/null @@ -1,86 +0,0 @@ -// file : cult/sched/thread.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2005-2010 Boris Kolpackov -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef CULT_SCHED_THREAD_HXX -#define CULT_SCHED_THREAD_HXX - -#include -#include - -#include -#include - -#include - -#include - -namespace Cult -{ - namespace Sched - { - // Instantiating an automatic variable of type Thread results - // in undefined behavior (read core dump). - // - class Thread: public MM::ServiceAwareObject - { - public: - struct Exception: virtual Sched::Exception {}; - - public: - virtual - ~Thread (); - - Thread (Void* (*StartRoutine) (Void*), Void* arg = 0); - - // Adopt an existing thread. Adoption of a detached thread - // results in undefined behavior. Adoption of an already - // adopted thread results in Adopted exception. - // - - struct Adopted: virtual Exception {}; - - Thread (); - - public: - // Joining an already joined thread results in Joined exception. - // - - struct Joined: virtual Exception {}; - - //@@ Need to work out the cancelled case. - // - Void* - join (); - - Void - cancel (); - - public: - static Void - exit (Void* ret); - - // self() may not be called in TSD destructors. Call to self() from - // a foreign thread (i.e., one that is neither native nor adopted) - // results in Foreign exception. - // - - struct Foreign: virtual Exception {}; - - static Shptr - self (); - - static Void - test_cancel (); - - private: - pthread_t id_; - - Boolean detached_; - Mutex mutex_; - }; - } -} - -#endif // CULT_SCHED_THREAD_HXX -- cgit v1.2.3