24#define RVM_STACKSIZE 1024 * 16
25#define BOGUSCODE (BOGUS_USE_OF_CTHREADS)
27#define RVM_MUTEX struct Lock
28#define RVM_CONDITION char
29#define MUTEX_INITIALIZER { 0, 0, 0, 0 }
33#define cthread_t PROCESS
38 "rvm_thread", &rvm_lwppid);
41#define cthread_init() \
43 LWP_Init(LWP_VERSION, LWP_NORMAL_PRIORITY, NULL); \
46#define cthread_uninit(retval) \
49 LWP_TerminateProcessSupport(); \
51#define cthread_exit(retval)
53#define cthread_yield() \
56 LWP_DispatchProcess(); \
58#define cthread_join(thread) (0)
60#define condition_wait(c, m) \
62 ReleaseWriteLock((m)); \
63 LWP_WaitProcess((c)); \
64 ObtainWriteLock((m)); \
66#define condition_signal(c) (LWP_SignalProcess((c)))
67#define condition_broadcast(c) (LWP_SignalProcess((c)))
68#define condition_clear(c)
69#define condition_init(c)
70#define mutex_init(m) (Lock_Init(m))
72#define LOCK_FREE(m) (!WriteLocked(&(m)))
83#define mutex_lock(m) \
85 printf("mutex_lock OL(0x%x)%s:%d...", (m), __FILE__, __LINE__); \
86 ObtainWriteLock((m)); \
89#define mutex_unlock(m) \
91 printf("mutex_unlock RL(0x%x)%s:%d...", (m), __FILE__, __LINE__); \
92 ReleaseWriteLock((m)); \
96#define mutex_lock(m) ObtainWriteLock((m))
97#define mutex_unlock(m) ReleaseWriteLock((m))
102#define mutex_alloc() BOGUSCODE
103#define mutex_set_name(m, x) BOGUSCODE
104#define mutex_name(m) BOGUSCODE
105#define mutex_free(m) BOGUSCODE
107#define condition_alloc() BOGUSCODE
108#define condition_set_name(c, x) BOGUSCODE
109#define condition_name(c) BOGUSCODE
110#define condition_free(c) BOGUSCODE
112#define cthread_detach() BOGUSCODE
113#define cthread_sp() BOGUSCODE
114#define cthread_assoc(id, t) BOGUSCODE
115#define cthread_set_name BOGUSCODE
116#define cthread_name BOGUSCODE
117#define cthread_count() BOGUSCODE
118#define cthread_set_limit BOGUSCODE
119#define cthread_limit() BOGUSCODE
120#define cthread_set_data(t, x) BOGUSCODE
121#define cthread_data(t) BOGUSCODE
#define cthread_fork(func, arg)
Definition: cthreads.h:101
#define cthread_self()
Definition: cthreads.h:111
int LWP_CreateProcess(void(*ep)(void *), int stacksize, int priority, void *parm, const char *name, PROCESS *pid)
Definition: lwp_pt.c:297
#define LWP_NORMAL_PRIORITY
Definition: lwp.h:86
int LWP_CurrentProcess(PROCESS *pid)
Definition: lwp_pt.c:214
#define RVM_STACKSIZE
Definition: rvm_lwp.h:24
Definition: lwp.private_pt.h:33