00001 // Package : omnithread 00002 // omnithread/solaris.h Created : 7/94 tjr 00003 // 00004 // Copyright (C) 1994,1995,1996, 1997 Olivetti & Oracle Research Laboratory 00005 // 00006 // This file is part of the omnithread library 00007 // 00008 // The omnithread library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // Library General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU Library General Public 00019 // License along with this library; if not, write to the Free 00020 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00021 // 02111-1307, USA 00022 // 00023 // OMNI thread implementation classes for solaris threads. 00024 // 00025 00026 #ifndef __omnithread_solaris_h_ 00027 #define __omnithread_solaris_h_ 00028 00029 #include <thread.h> 00030 00031 extern "C" void* omni_thread_wrapper(void* ptr); 00032 00033 #define OMNI_MUTEX_IMPLEMENTATION \ 00034 mutex_t sol_mutex; 00035 00036 #define OMNI_CONDITION_IMPLEMENTATION \ 00037 cond_t sol_cond; 00038 00039 #define OMNI_SEMAPHORE_IMPLEMENTATION \ 00040 sema_t sol_sem; 00041 00042 #define OMNI_THREAD_IMPLEMENTATION \ 00043 thread_t sol_thread; \ 00044 static int sol_priority(priority_t); \ 00045 friend void* omni_thread_wrapper(void* ptr); 00046 00047 #endif