Mercurial > repos > rhope
view runtime/thread.h @ 48:a24eb366195c
Fixed some bugs introduced in previous commit and moved definition of integer methods out of runtime and into the compiler
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 02 Mar 2010 00:18:49 -0500 |
parents | d61550e2c001 |
children |
line wrap: on
line source
#ifndef _THREAD_H_ #define _THREAD_H_ #include "plat_types.h" #ifdef USE_THREADS #include "plat_thread.h" #else #define rh_atomic32(var) int32_t var #define rh_atomic_add(parent,var,val) (parent)->var += (val) #define rh_atomic_sub(parent,var,val) (parent)->var -= (val) #define rh_atomic_sub_testzero(parent,var,val) (((parent)->var -= (val)) == 0) #define rh_atomic_set(parent,var,val) (parent)->var = val #define rh_atomic_get(parent,var) ((parent)->var) #define rh_start_thread(func,data,name) #define rh_mutex(var) #define rh_mutex_init(var) #define rh_lock(lock) #define rh_unlock(lock) #define rh_mutex_del(var) #endif //USE_THREADS #endif //_THREAD_H_