"Fossies" - the Fresh Open Source Software Archive

Member "pidentd-3.0.19/src/hp_pthread.h" (20 Jan 1999, 2117 Bytes) of package /linux/misc/old/pidentd-3.0.19.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "hp_pthread.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 ** hp_pthread.h - CMA Pthreads definitions for systems missing the
    3 **         <pthread.h> header file, but having the CMA library.
    4 **         (Ie: HP-UX 10.20)
    5 **
    6 ** Copyright (c) 1997 Peter Eriksson <pen@lysator.liu.se>
    7 **
    8 ** This program is free software; you can redistribute it and/or
    9 ** modify it as you wish - as long as you don't claim that you wrote
   10 ** it.
   11 **
   12 ** This program is distributed in the hope that it will be useful,
   13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
   14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   15 */
   16 
   17 #ifndef PIDENTD_HP_PTHREAD_H
   18 #define PIDENTD_HP_PTHREAD_H
   19 
   20 #include <sys/time.h>
   21 
   22 extern int *__errno();
   23 #define errno (*__errno())
   24 
   25 
   26 typedef struct
   27 {
   28     void *field1;
   29     short int field2;
   30     short int field3;
   31 } cma_t_handle;
   32 
   33 typedef cma_t_handle pthread_attr_t;
   34 typedef cma_t_handle pthread_mutexattr_t;
   35 typedef cma_t_handle pthread_condattr_t;
   36 
   37 typedef cma_t_handle pthread_t;
   38 typedef cma_t_handle pthread_mutex_t;
   39 typedef cma_t_handle pthread_cond_t;
   40 
   41 typedef struct
   42 {
   43     int f1;
   44     int f2;
   45     int f3;
   46 } pthread_once_t;
   47 
   48 
   49 /*
   50 ** Global default attribute variables
   51 */
   52 extern pthread_attr_t       pthread_attr_default;
   53 extern pthread_mutexattr_t  pthread_mutexattr_default;
   54 extern pthread_condattr_t   pthread_condattr_default;
   55 
   56 
   57 extern int
   58 pthread_mutex_init(pthread_mutex_t *,
   59            pthread_mutexattr_t);
   60 
   61 extern int
   62 pthread_mutex_lock(pthread_mutex_t *);
   63 
   64 extern int
   65 pthread_mutex_unlock(pthread_mutex_t *);
   66 
   67 extern int
   68 pthread_mutex_destroy(pthread_mutex_t *);
   69 
   70 
   71 
   72 extern int
   73 pthread_cond_init(pthread_cond_t *,
   74           pthread_condattr_t);
   75 
   76 extern int
   77 pthread_cond_wait(pthread_cond_t *,
   78           pthread_mutex_t *);
   79 
   80 extern int
   81 pthread_cond_timedwait(pthread_cond_t *,
   82                pthread_mutex_t *,
   83                struct timespec *);
   84 
   85 extern int
   86 pthread_cond_signal(pthread_cond_t *);
   87 
   88 extern int
   89 pthread_cond_broadcast(pthread_cond_t *);
   90 
   91 extern int
   92 pthread_cond_destroy(pthread_cond_t *);
   93 
   94 
   95 extern int
   96 pthread_create(pthread_t *,
   97            pthread_attr_t,
   98            void *(*)(void *),
   99            void *);
  100 
  101 extern int
  102 pthread_once(pthread_once_t *,
  103          void (*)(void));
  104 
  105 #endif