[BACK]Return to solaris_threads.h CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / gc / include / private

File: [local] / OpenXM_contrib2 / asir2000 / gc / include / private / solaris_threads.h (download)

Revision 1.3, Wed Jul 24 08:00:21 2002 UTC (21 years, 11 months ago) by noro
Branch: MAIN
CVS Tags: R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.2: +4 -3 lines

Added gc6.1alpha5.

#ifdef GC_SOLARIS_THREADS

/* The set of all known threads.  We intercept thread creation and     */
/* joins.  We never actually create detached threads.  We allocate all */
/* new thread stacks ourselves.  These allow us to maintain this       */
/* data structure.                                                     */
/* Protected by GC_thr_lock.                                           */
/* Some of this should be declared volatile, but that's incosnsistent  */
/* with some library routine declarations.  In particular, the 	       */
/* definition of cond_t doesn't mention volatile!                      */
  typedef struct GC_Thread_Rep {
    struct GC_Thread_Rep * next;
    thread_t id;
    word flags;
#      define FINISHED 1       /* Thread has exited.   */
#      define DETACHED 2       /* Thread is intended to be detached.   */
#      define CLIENT_OWNS_STACK        4
                               /* Stack was supplied by client.        */
#      define SUSPNDED 8       /* Currently suspended.			*/
    			       /* SUSPENDED is used insystem header.	*/
    ptr_t stack;
    size_t stack_size;
    cond_t join_cv;
    void * status;
  } * GC_thread;
  extern GC_thread GC_new_thread(thread_t id);

  extern GC_bool GC_thr_initialized;
  extern volatile GC_thread GC_threads[];
  extern size_t GC_min_stack_sz;
  extern size_t GC_page_sz;
  extern void GC_thr_init(void);

# endif /* GC_SOLARIS_THREADS */