|
Revision 4328
(checked in by eb, 2 years ago)
|
Merged eb/omni -r4315:4327 into trunk.
Extracted omnithread from gnuradio-core and made it a top-level
component. This allows mblock to use it without a dependency on
gnuradio-core. Completes ticket:132
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
#ifndef __omnithread_mach_h_ |
|---|
| 28 |
#define __omnithread_mach_h_ |
|---|
| 29 |
|
|---|
| 30 |
#include <mach/cthreads.h> |
|---|
| 31 |
|
|---|
| 32 |
extern "C" void* omni_thread_wrapper(void* ptr); |
|---|
| 33 |
|
|---|
| 34 |
#define OMNI_MUTEX_IMPLEMENTATION \ |
|---|
| 35 |
struct mutex mach_mutex; |
|---|
| 36 |
|
|---|
| 37 |
#define OMNI_CONDITION_IMPLEMENTATION \ |
|---|
| 38 |
struct condition mach_cond; |
|---|
| 39 |
|
|---|
| 40 |
#define OMNI_SEMAPHORE_IMPLEMENTATION \ |
|---|
| 41 |
omni_mutex m; \ |
|---|
| 42 |
omni_condition c; \ |
|---|
| 43 |
int value; |
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
#define OMNI_THREAD_IMPLEMENTATION \ |
|---|
| 47 |
cthread_t mach_thread; \ |
|---|
| 48 |
static int mach_priority(priority_t); \ |
|---|
| 49 |
friend void* omni_thread_wrapper(void* ptr); |
|---|
| 50 |
|
|---|
| 51 |
#endif |
|---|