Sha256: e5e3fe3f753f244b248313566bc33842fab0157a2936c3e33a29c497980ae095

Contents?: true

Size: 1.09 KB

Versions: 22

Compression:

Stored size: 1.09 KB

Contents

/**********************************************************************

  thread_pthread.h -

  $Author$

  Copyright (C) 2004-2007 Koichi Sasada

**********************************************************************/

#ifndef RUBY_THREAD_PTHREAD_H
#define RUBY_THREAD_PTHREAD_H

#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
typedef pthread_t rb_thread_id_t;
typedef pthread_mutex_t rb_thread_lock_t;

typedef struct rb_thread_cond_struct {
    pthread_cond_t cond;
#ifdef HAVE_CLOCKID_T
    clockid_t clockid;
#endif
} rb_thread_cond_t;

typedef struct native_thread_data_struct {
    void *signal_thread_list;
    rb_thread_cond_t sleep_cond;
} native_thread_data_t;

#include <semaphore.h>

typedef struct rb_global_vm_lock_struct {
    /* fast path */
    unsigned long acquired;
    pthread_mutex_t lock;

    /* slow path */
    volatile unsigned long waiting;
    rb_thread_cond_t cond;

    /* yield */
    rb_thread_cond_t switch_cond;
    rb_thread_cond_t switch_wait_cond;
    int need_yield;
    int wait_yield;
} rb_global_vm_lock_t;

#endif /* RUBY_THREAD_PTHREAD_H */

Version data entries

22 entries across 22 versions & 4 rubygems

Version Path
bindex-0.2.0 ext/bindex/ruby_193/thread_pthread.h
bindex-0.1.1 ext/bindex/ruby_193/thread_pthread.h
bindex-0.1.0 ext/bindex/ruby_193/thread_pthread.h
did_you_mean-0.9.2 ext/did_you_mean/ruby_headers/193/thread_pthread.h
did_you_mean-0.9.0 ext/did_you_mean/ruby_headers/193/thread_pthread.h
did_you_mean-0.5.0 ext/did_you_mean/ruby_headers/193/thread_pthread.h
did_you_mean-0.4.0 ext/did_you_mean/ruby_headers/193/thread_pthread.h
did_you_mean-0.3.1 ext/did_you_mean/ruby_headers/193/thread_pthread.h
did_you_mean-0.3.0 ext/did_you_mean/ruby_headers/193/thread_pthread.h
did_you_mean-0.2.0 ext/did_you_mean/ruby_headers/193/thread_pthread.h
cast_off-0.4.1 ext/cast_off/ruby_source/1.9.3/thread_pthread.h
pline-0.0.3 ext/pline/ruby_source/1.9.3/thread_pthread.h
cast_off-0.4.0 ext/cast_off/ruby_source/1.9.3/thread_pthread.h
cast_off-0.3.7 ext/cast_off/ruby_source/1.9.3/thread_pthread.h
cast_off-0.3.6 ext/cast_off/ruby_source/1.9.3/thread_pthread.h
cast_off-0.3.5 ext/cast_off/ruby_source/1.9.3/thread_pthread.h
cast_off-0.3.4 ext/cast_off/ruby_source/1.9.3/thread_pthread.h
cast_off-0.3.2 ext/cast_off/ruby_source/1.9.3/thread_pthread.h
cast_off-0.3.1 ext/cast_off/ruby_source/1.9.3/thread_pthread.h
cast_off-0.2.3 ext/cast_off/ruby_source/1.9.3/thread_pthread.h