Print this page
pthread_attr_setstackaddr removed in XPG7

Split Close
Expand all
Collapse all
          --- old/usr/src/head/pthread.h
          +++ new/usr/src/head/pthread.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
       27 +/*
       28 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       29 + */
       30 +
  27   31  #ifndef _PTHREAD_H
  28   32  #define _PTHREAD_H
  29   33  
  30   34  #include <sys/feature_tests.h>
  31   35  
  32   36  #ifndef _ASM
  33   37  #include <sys/types.h>
  34   38  #include <time.h>
  35   39  #include <sched.h>
  36   40  #endif  /* _ASM */
↓ open down ↓ 139 lines elided ↑ open up ↑
 176  180  
 177  181  #define pthread_cleanup_push(routine, args) { \
 178  182          _cleanup_t _cleanup_info; \
 179  183          __pthread_cleanup_push((_Voidfp)(routine), (void *)(args), \
 180  184                                  (caddr_t)_getfp(), &_cleanup_info);
 181  185  
 182  186  #define pthread_cleanup_pop(ex) \
 183  187          __pthread_cleanup_pop(ex, &_cleanup_info); \
 184  188  }
 185  189  
 186      -#ifdef  __STDC__
 187      -
 188  190  /*
 189  191   * function prototypes - thread related calls
 190  192   */
 191  193  
 192  194  /*
 193  195   * pthread_atfork() is also declared in <unistd.h> as per SUSv2. The
 194  196   * declarations are identical. A change to either one may also require
 195  197   * appropriate namespace updates in order to avoid redeclaration
 196  198   * warnings in the case where both prototypes are exposed via inclusion
 197  199   * of both <pthread.h> and <unistd.h>.
 198  200   */
 199  201  extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
 200  202  extern int pthread_attr_init(pthread_attr_t *);
 201  203  extern int pthread_attr_destroy(pthread_attr_t *);
 202  204  extern int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
 203  205  extern int pthread_attr_getstack(const pthread_attr_t *_RESTRICT_KYWD,
 204  206                  void **_RESTRICT_KYWD, size_t *_RESTRICT_KYWD);
 205  207  extern int pthread_attr_setstacksize(pthread_attr_t *, size_t);
 206  208  extern int pthread_attr_getstacksize(const pthread_attr_t *_RESTRICT_KYWD,
 207  209                  size_t *_RESTRICT_KYWD);
      210 +
      211 +#if !defined(_STRICT_SYMBOLS) && !defined(_XPG7)
 208  212  extern int pthread_attr_setstackaddr(pthread_attr_t *, void *);
 209  213  extern int pthread_attr_getstackaddr(const pthread_attr_t *_RESTRICT_KYWD,
 210  214                  void **_RESTRICT_KYWD);
      215 +#endif
      216 +
 211  217  extern int pthread_attr_setdetachstate(pthread_attr_t *, int);
 212  218  extern int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
 213  219  extern int pthread_attr_setscope(pthread_attr_t *, int);
 214  220  extern int pthread_attr_getscope(const pthread_attr_t *_RESTRICT_KYWD,
 215  221          int *_RESTRICT_KYWD);
 216  222  extern int pthread_attr_setinheritsched(pthread_attr_t *, int);
 217  223  extern int pthread_attr_getinheritsched(const pthread_attr_t *_RESTRICT_KYWD,
 218  224          int *_RESTRICT_KYWD);
 219  225  extern int pthread_attr_setschedpolicy(pthread_attr_t *, int);
 220  226  extern int pthread_attr_getschedpolicy(const pthread_attr_t *_RESTRICT_KYWD,
↓ open down ↓ 119 lines elided ↑ open up ↑
 340  346          const pthread_barrierattr_t *_RESTRICT_KYWD, uint_t);
 341  347  extern int pthread_barrier_destroy(pthread_barrier_t *);
 342  348  extern int pthread_barrier_wait(pthread_barrier_t *);
 343  349  
 344  350  /* Historical names -- present only for binary compatibility */
 345  351  extern int pthread_mutex_consistent_np(pthread_mutex_t *);
 346  352  extern int pthread_mutexattr_setrobust_np(pthread_mutexattr_t *, int);
 347  353  extern int pthread_mutexattr_getrobust_np(
 348  354          const pthread_mutexattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
 349  355  
 350      -#else   /* __STDC__ */
 351      -
 352      -/*
 353      - * function prototypes - thread related calls
 354      - */
 355      -extern int pthread_atfork();
 356      -extern int pthread_attr_init();
 357      -extern int pthread_attr_destroy();
 358      -extern int pthread_attr_setstack();
 359      -extern int pthread_attr_getstack();
 360      -extern int pthread_attr_setstacksize();
 361      -extern int pthread_attr_getstacksize();
 362      -extern int pthread_attr_setstackaddr();
 363      -extern int pthread_attr_getstackaddr();
 364      -extern int pthread_attr_setdetachstate();
 365      -extern int pthread_attr_getdetachstate();
 366      -extern int pthread_attr_setscope();
 367      -extern int pthread_attr_getscope();
 368      -extern int pthread_attr_setinheritsched();
 369      -extern int pthread_attr_getinheritsched();
 370      -extern int pthread_attr_setschedpolicy();
 371      -extern int pthread_attr_getschedpolicy();
 372      -extern int pthread_attr_setschedparam();
 373      -extern int pthread_attr_getschedparam();
 374      -extern int pthread_create();
 375      -extern int pthread_once();
 376      -extern int pthread_join();
 377      -extern int pthread_detach();
 378      -extern void pthread_exit();
 379      -extern int pthread_cancel();
 380      -extern int pthread_setschedparam();
 381      -extern int pthread_getschedparam();
 382      -extern int pthread_setschedprio();
 383      -extern int pthread_setcancelstate();
 384      -extern int pthread_setcanceltype();
 385      -extern void pthread_testcancel();
 386      -extern int pthread_equal();
 387      -extern int pthread_key_create();
 388      -extern int pthread_key_create_once_np();
 389      -extern int pthread_key_delete();
 390      -extern int pthread_setspecific();
 391      -extern void *pthread_getspecific();
 392      -extern pthread_t pthread_self();
 393      -/*
 394      - * function prototypes - synchronization related calls
 395      - */
 396      -extern int pthread_mutexattr_init();
 397      -extern int pthread_mutexattr_destroy();
 398      -extern int pthread_mutexattr_setpshared();
 399      -extern int pthread_mutexattr_getpshared();
 400      -extern int pthread_mutexattr_setprotocol();
 401      -extern int pthread_mutexattr_getprotocol();
 402      -extern int pthread_mutexattr_setprioceiling();
 403      -extern int pthread_mutexattr_getprioceiling();
 404      -extern int pthread_mutexattr_setrobust();
 405      -extern int pthread_mutexattr_getrobust();
 406      -extern int pthread_mutex_init();
 407      -extern int pthread_mutex_consistent();
 408      -extern int pthread_mutex_destroy();
 409      -extern int pthread_mutex_lock();
 410      -extern int pthread_mutex_timedlock();
 411      -extern int pthread_mutex_reltimedlock_np();
 412      -extern int pthread_mutex_unlock();
 413      -extern int pthread_mutex_trylock();
 414      -extern int pthread_mutex_setprioceiling();
 415      -extern int pthread_mutex_getprioceiling();
 416      -extern int pthread_condattr_init();
 417      -extern int pthread_condattr_destroy();
 418      -extern int pthread_condattr_setclock();
 419      -extern int pthread_condattr_getclock();
 420      -extern int pthread_condattr_setpshared();
 421      -extern int pthread_condattr_getpshared();
 422      -extern int pthread_cond_init();
 423      -extern int pthread_cond_destroy();
 424      -extern int pthread_cond_broadcast();
 425      -extern int pthread_cond_signal();
 426      -extern int pthread_cond_wait();
 427      -extern int pthread_cond_timedwait();
 428      -extern int pthread_cond_reltimedwait_np();
 429      -extern int pthread_attr_getguardsize();
 430      -extern int pthread_attr_setguardsize();
 431      -extern int pthread_getconcurrency();
 432      -extern int pthread_setconcurrency();
 433      -extern int pthread_mutexattr_settype();
 434      -extern int pthread_mutexattr_gettype();
 435      -extern int pthread_rwlock_init();
 436      -extern int pthread_rwlock_destroy();
 437      -extern int pthread_rwlock_rdlock();
 438      -extern int pthread_rwlock_tryrdlock();
 439      -extern int pthread_rwlock_wrlock();
 440      -extern int pthread_rwlock_trywrlock();
 441      -extern int pthread_rwlock_unlock();
 442      -extern int pthread_rwlockattr_init();
 443      -extern int pthread_rwlockattr_destroy();
 444      -extern int pthread_rwlockattr_getpshared();
 445      -extern int pthread_rwlockattr_setpshared();
 446      -extern int pthread_spin_init();
 447      -extern int pthread_spin_destroy();
 448      -extern int pthread_spin_lock();
 449      -extern int pthread_spin_trylock();
 450      -extern int pthread_spin_unlock();
 451      -extern int pthread_barrierattr_init();
 452      -extern int pthread_barrierattr_destroy();
 453      -extern int pthread_barrierattr_setpshared();
 454      -extern int pthread_barrierattr_getpshared();
 455      -extern int pthread_barrier_init();
 456      -extern int pthread_barrier_destroy();
 457      -extern int pthread_barrier_wait();
 458      -
 459      -/* Historical names -- present only for binary compatibility */
 460      -extern int pthread_mutex_consistent_np();
 461      -extern int pthread_mutexattr_setrobust_np();
 462      -extern int pthread_mutexattr_getrobust_np();
 463      -
 464      -#endif  /* __STDC__ */
 465      -
 466  356  #endif  /* _ASM */
 467  357  
 468  358  #ifdef  __cplusplus
 469  359  }
 470  360  #endif
 471  361  
 472  362  #endif  /* _PTHREAD_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX