Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/thread.h
          +++ new/usr/src/head/thread.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
       23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       24 + *
  23   25   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26   28  
  27   29  #ifndef _THREAD_H
  28   30  #define _THREAD_H
  29   31  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   32  /*
  33   33   * thread.h:
  34   34   * definitions needed to use the thread interface except synchronization.
  35   35   * use <synch.h> for thread synchronization.
  36   36   */
  37   37  
  38   38  #ifndef _ASM
  39   39  #include <sys/signal.h>
  40   40  #include <sys/time.h>
  41   41  #include <synch.h>
↓ open down ↓ 2 lines elided ↑ open up ↑
  44   44  #ifdef __cplusplus
  45   45  extern "C" {
  46   46  #endif
  47   47  
  48   48  #ifndef _ASM
  49   49  typedef unsigned int thread_t;
  50   50  typedef unsigned int thread_key_t;
  51   51  #endif /* _ASM */
  52   52  
  53   53  #ifndef _ASM
  54      -#ifdef __STDC__
  55   54  
  56   55  extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
  57   56                          thread_t *);
  58   57  extern int thr_join(thread_t, thread_t *, void **);
  59   58  extern int thr_setconcurrency(int);
  60   59  extern int thr_getconcurrency(void);
  61   60  extern void thr_exit(void *) __NORETURN;
  62   61  extern thread_t thr_self(void);
  63   62  
  64   63  /*
↓ open down ↓ 20 lines elided ↑ open up ↑
  85   84  extern int thr_continue(thread_t);
  86   85  extern void thr_yield(void);
  87   86  extern int thr_setprio(thread_t, int);
  88   87  extern int thr_getprio(thread_t, int *);
  89   88  extern int thr_keycreate(thread_key_t *, void(*)(void *));
  90   89  extern int thr_keycreate_once(thread_key_t *, void(*)(void *));
  91   90  extern int thr_setspecific(thread_key_t, void *);
  92   91  extern int thr_getspecific(thread_key_t, void **);
  93   92  extern size_t thr_min_stack(void);
  94   93  
  95      -#else /* __STDC */
  96      -
  97      -extern int thr_create();
  98      -extern int thr_join();
  99      -extern int thr_setconcurrency();
 100      -extern int thr_getconcurrency();
 101      -extern void thr_exit();
 102      -extern thread_t thr_self();
 103      -extern int thr_sigsetmask();
 104      -extern int thr_stksegment();
 105      -extern int thr_main();
 106      -extern int thr_kill();
 107      -extern int thr_suspend();
 108      -extern int thr_continue();
 109      -extern void thr_yield();
 110      -extern int thr_setprio();
 111      -extern int thr_getprio();
 112      -extern int thr_keycreate();
 113      -extern int thr_keycreate_once();
 114      -extern int thr_setspecific();
 115      -extern int thr_getspecific();
 116      -extern size_t thr_min_stack();
 117      -
 118      -#endif /* __STDC */
 119   94  #endif /* _ASM */
 120   95  
 121   96  #define THR_MIN_STACK   thr_min_stack()
 122   97  /*
 123   98   * thread flags (one word bit mask)
 124   99   */
 125  100  /*
 126  101   * POSIX.1c Note:
 127  102   * THR_BOUND is defined same as PTHREAD_SCOPE_SYSTEM in <pthread.h>
 128  103   * THR_DETACHED is defined same as PTHREAD_CREATE_DETACHED in <pthread.h>
↓ open down ↓ 28 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX