Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

ot_mach.h

Go to the documentation of this file.
00001 //                              Package : omnithread
00002 // omnithread/posix.h           Created : 7/97 lars immisch lars@ibp.de
00003 //
00004 //    Copyright (C) 1994,1995,1996, 1997 Immisch, becker & Partner
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 //
00024 // OMNI thread implementation classes for posix threads
00025 //
00026 
00027 #ifndef __omnithread_mach_h_
00028 #define __omnithread_mach_h_
00029 
00030 #include <mach/cthreads.h>
00031 
00032 extern "C" void* omni_thread_wrapper(void* ptr);
00033 
00034 #define OMNI_MUTEX_IMPLEMENTATION                       \
00035     struct mutex mach_mutex;
00036 
00037 #define OMNI_CONDITION_IMPLEMENTATION                   \
00038     struct condition mach_cond;
00039 
00040 #define OMNI_SEMAPHORE_IMPLEMENTATION                   \
00041     omni_mutex m;                                       \
00042     omni_condition c;                                   \
00043     int value;
00044 
00045 
00046 #define OMNI_THREAD_IMPLEMENTATION                      \
00047     cthread_t mach_thread;                              \
00048     static int mach_priority(priority_t);               \
00049     friend void* omni_thread_wrapper(void* ptr);
00050 
00051 #endif

Generated on Sat Jul 8 17:04:52 2006 for GNU Radio 2.x by  doxygen 1.4.1