00001 /*************************************************************************** 00002 LOW_thread_Factory.cpp - description 00003 ------------------- 00004 begin : Thu Oct 2 2003 00005 copyright : (C) 2003 by Harald Roelle 00006 email : roelle@informatik.uni-muenchen.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 00019 #include "LOW_thread_Factory.h" 00020 #include "LOW_thread_mutex_POSIX.h" 00021 #include "LOW_thread_rwlock_POSIX.h" 00022 #include "LOW_thread_thread_POSIX.h" 00023 00024 00025 //===================================================================================== 00026 // 00027 // constructors 00028 // 00029 00030 LOW_thread_Factory::LOW_thread_Factory() 00031 { 00032 } 00033 00034 00035 LOW_thread_Factory::~LOW_thread_Factory() 00036 { 00037 } 00038 00039 00040 //===================================================================================== 00041 // 00042 // static factory 00043 // 00044 00045 LOW_thread_mutex* LOW_thread_Factory::new_mutex( const LOW_thread_mutex::mutexKind_t inMutexKind) 00046 { 00047 #ifdef __linux__ 00048 return new LOW_thread_mutex_POSIX( inMutexKind); 00049 #endif 00050 } 00051 00052 00053 LOW_thread_rwlock* LOW_thread_Factory::new_rwlock() 00054 { 00055 #ifdef __linux__ 00056 return new LOW_thread_rwlock_POSIX(); 00057 #endif 00058 } 00059 00060 00061 LOW_thread_thread* LOW_thread_Factory::new_thread( LOW_thread_runable *inRunable) 00062 { 00063 #ifdef __linux__ 00064 return new LOW_thread_thread_POSIX( inRunable); 00065 #endif 00066 } 00067