70 |
#define scm_i_plugin_thread_yield sched_yield |
#define scm_i_plugin_thread_yield sched_yield |
71 |
|
|
72 |
/* Size is checked in scm_init_pthread_threads */ |
/* Size is checked in scm_init_pthread_threads */ |
|
#ifdef SCM_DEBUG_THREADS |
|
73 |
#define SCM_MUTEX_MAXSIZE (9 * sizeof (long)) |
#define SCM_MUTEX_MAXSIZE (9 * sizeof (long)) |
|
#else |
|
|
#define SCM_MUTEX_MAXSIZE (6 * sizeof (long)) |
|
|
#endif |
|
74 |
typedef struct { char _[SCM_MUTEX_MAXSIZE]; } scm_t_mutex; |
typedef struct { char _[SCM_MUTEX_MAXSIZE]; } scm_t_mutex; |
75 |
#define scm_t_mutexattr pthread_mutexattr_t |
#define scm_t_mutexattr pthread_mutexattr_t |
76 |
|
|
96 |
pthread_mutex_trylock ((pthread_mutex_t *) (m)) |
pthread_mutex_trylock ((pthread_mutex_t *) (m)) |
97 |
|
|
98 |
/* Size is checked in scm_init_pthread_threads */ |
/* Size is checked in scm_init_pthread_threads */ |
|
#ifdef SCM_DEBUG_THREADS |
|
99 |
#define SCM_REC_MUTEX_MAXSIZE (SCM_MUTEX_MAXSIZE + 3 * sizeof (long)) |
#define SCM_REC_MUTEX_MAXSIZE (SCM_MUTEX_MAXSIZE + 3 * sizeof (long)) |
|
#else |
|
|
#ifdef SCM_MUTEX_RECURSIVE |
|
|
#define SCM_REC_MUTEX_MAXSIZE SCM_MUTEX_MAXSIZE |
|
|
#else |
|
|
#define SCM_REC_MUTEX_MAXSIZE (SCM_MUTEX_MAXSIZE + 2 * sizeof (long)) |
|
|
#endif |
|
|
#endif |
|
100 |
typedef struct { char _[SCM_REC_MUTEX_MAXSIZE]; } scm_t_rec_mutex; |
typedef struct { char _[SCM_REC_MUTEX_MAXSIZE]; } scm_t_rec_mutex; |
101 |
|
|
102 |
extern scm_t_mutexattr scm_i_plugin_rec_mutex; |
extern scm_t_mutexattr scm_i_plugin_rec_mutex; |
148 |
|
|
149 |
#define scm_i_plugin_select select |
#define scm_i_plugin_select select |
150 |
|
|
151 |
|
#ifdef SCM_DEBUG_THREADS |
152 |
|
void scm_i_assert_heap_locked (void); |
153 |
|
#endif |
154 |
|
|
155 |
void scm_init_pthread_threads (void); |
void scm_init_pthread_threads (void); |
156 |
|
|
157 |
#endif /* SCM_THREADS_PTHREADS_H */ |
#endif /* SCM_THREADS_PTHREADS_H */ |