delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/04/10/17:01:15

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <00c901c0c1bd$59a85e40$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin-developers AT cygwin DOT com>
Subject: pthreads
Date: Tue, 10 Apr 2001 22:54:14 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 10 Apr 2001 12:47:41.0374 (UTC) FILETIME=[6E3AE5E0:01C0C1BC]

I have a working directory here that implements the following functions
(and thanks to Bernard Dautrevaux, pthread_once should be race free :])

I'm not 100% happy with the code yet - there are some known loose
ends/potential races that I need to clean up before I submit a formal
patch. However if any of you want an interim patch to play around
with/comment on I'd be happy to run it off and drop it into
cygwin-patches.

I've also got a trival patch for sys/features.h to line up with the
posix conformance we should get if this goes in.

function list for pthreads (taken against CVS - some duplicates with the
existing outstanding patch)
/* Attributes */
  int pthread_attr_getdetachstate (const pthread_attr_t *, int *);
  int pthread_attr_getinheritsched (const pthread_attr_t *, int *);
  int pthread_attr_getschedparam (const pthread_attr_t *,
                                  struct sched_param *);
  int pthread_attr_getschedpolicy (const pthread_attr_t *, int *);
  int pthread_attr_getscope (const pthread_attr_t *, int *);
  int pthread_attr_setdetachstate (pthread_attr_t *, int);
  int pthread_attr_setinheritsched (pthread_attr_t *, int);
  int pthread_attr_setschedparam (pthread_attr_t *,
                                  const struct sched_param *);
  int pthread_attr_setschedpolicy (pthread_attr_t *, int);
  int pthread_attr_setscope (pthread_attr_t *, int);
  int pthread_cancel (pthread_t);
/* these two are implemented via macros as per a suggestion in the doco
I'm using */
void pthread_cleanup_push(void (*routine)(void*), void *arg);
void pthread_cleanup_pop(int execute);
  int pthread_getschedparam (pthread_t, int *, struct sched_param *);
  int pthread_join (pthread_t, void **);
  int pthread_key_create (pthread_key_t *, void (*)(void *));
  int pthread_key_delete (pthread_key_t);

/* Mutex's */
  int pthread_mutex_getprioceiling (const pthread_mutex_t *, int *);
  int pthread_mutex_setprioceiling (pthread_mutex_t *, int, int *);
  int pthread_mutexattr_destroy (pthread_mutexattr_t *);
  int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *, int
*);
  int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *, int
*);
  int pthread_mutexattr_getpshared (const pthread_mutexattr_t *, int *);
  int pthread_mutexattr_gettype (const pthread_mutexattr_t *, int *);
  int pthread_mutexattr_init (pthread_mutexattr_t *);
  int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *, int);
  int pthread_mutexattr_setprotocol (pthread_mutexattr_t *, int);
  int pthread_mutexattr_setpshared (pthread_mutexattr_t *, int);
  int pthread_mutexattr_settype (pthread_mutexattr_t *, int);

  int pthread_once (pthread_once_t *, void (*)(void));

/* Concurrency levels - X/Open interface */
  int pthread_getconcurrency (void);
  int pthread_setconcurrency (int);

  int pthread_setcancelstate (int, int *);
  int pthread_setcanceltype (int, int *);
  int pthread_setschedparam (pthread_t, int, const struct sched_param
*);
  void pthread_testcancel (void);


Rob

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019