Index: winsup/cygwin/pthread.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/pthread.cc,v retrieving revision 1.6 diff -u -p -r1.6 pthread.cc --- pthread.cc 2001/03/21 02:17:57 1.6 +++ pthread.cc 2001/03/21 08:38:13 @@ -115,7 +115,7 @@ extern "C" } /* Thread signal */ - int pthread_kill (pthread_t * thread, int sig) + int pthread_kill (pthread_t thread, int sig) { return __pthread_kill (thread, sig); } Index: winsup/cygwin/thread.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/thread.cc,v retrieving revision 1.20 diff -u -p -r1.20 thread.cc --- thread.cc 2001/03/21 02:17:57 1.20 +++ thread.cc 2001/03/21 08:38:18 @@ -33,8 +33,6 @@ extern int threadsafe; #define MT_INTERFACE user_data->threadinterface -#define NOT_IMP(n) system_printf ("not implemented %s\n", n); return 0; - struct _reent * _reent_clib () { @@ -897,16 +895,16 @@ __pthread_condattr_destroy (pthread_cond /* Thread signal */ int -__pthread_kill (pthread_t * thread, int sig) +__pthread_kill (pthread_t thread, int sig) { // lock myself, for the use of thread2signal // two differ kills might clash: FIXME - if (!verifyable_object_isvalid (*thread, PTHREAD_MAGIC)) + if (!verifyable_object_isvalid (thread, PTHREAD_MAGIC)) return EINVAL; - if ((*thread)->sigs) - myself->setthread2signal (*thread); + if (thread->sigs) + myself->setthread2signal (thread); int rval = _kill (myself->pid, sig); Index: winsup/cygwin/thread.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/thread.h,v retrieving revision 1.12 diff -u -p -r1.12 thread.h --- thread.h 2001/03/21 02:17:58 1.12 +++ thread.h 2001/03/21 08:38:19 @@ -39,21 +39,7 @@ extern "C" #else -//#include -/* FIXME: these are defined in pthread.h, but pthread.h defines symbols it shouldn't - - * all the types. - */ -#define PTHREAD_PROCESS_PRIVATE 0 -#define PTHREAD_PROCESS_SHARED 1 -#define PTHREAD_DESTRUCTOR_ITERATIONS 1 -/* Tls has 64 items for pre win2000 - and we don't want to use them all :] - * Before committing discuss this with the list - */ -#define PTHREAD_KEYS_MAX 32 -#define PTHREAD_CREATE_DETACHED 1 -/* the default : joinable */ -#define PTHREAD_CREATE_JOINABLE 0 - +#include #include #include #include @@ -291,17 +277,6 @@ public: ~semaphore (); }; -typedef class pthread *pthread_t; -typedef class pthread_mutex *pthread_mutex_t; -/* sem routines belong in semaphore.cc */ -typedef class semaphore *sem_t; - -typedef class pthread_key *pthread_key_t; -typedef class pthread_attr *pthread_attr_t; -typedef class pthread_mutexattr *pthread_mutexattr_t; -typedef class pthread_condattr *pthread_condattr_t; -typedef class pthread_cond *pthread_cond_t; - class MTinterface { public: @@ -378,7 +353,7 @@ __pthread_attr_getstackaddr(...); int __pthread_condattr_setpshared (pthread_condattr_t * attr, int pshared); /* Thread signal */ - int __pthread_kill (pthread_t * thread, int sig); + int __pthread_kill (pthread_t thread, int sig); int __pthread_sigmask (int operation, const sigset_t * set, sigset_t * old_set); Index: winsup/cygwin/include/pthread.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/pthread.h,v retrieving revision 1.4 diff -u -p -r1.4 pthread.h --- pthread.h 2001/03/21 02:17:58 1.4 +++ pthread.h 2001/03/21 08:38:19 @@ -40,20 +40,6 @@ extern "C" /* the default : joinable */ #define PTHREAD_CREATE_JOINABLE 0 - -/* these shouldn't be defined here but in sys/types. - * defining in sys/types mught also allow us to override them for the internal functions - * more easily (internal sys/types vs external sys/type - dev thoughts on this? - */ - typedef void *pthread_t; - typedef void *pthread_mutex_t; - - typedef void *pthread_key_t; - typedef void *pthread_attr_t; - typedef void *pthread_mutexattr_t; - typedef void *pthread_condattr_t; - typedef void *pthread_cond_t; - /* ThreadCreation */ int pthread_create (pthread_t * thread, const pthread_attr_t * attr, void *(*)(void *), void *arg); @@ -90,11 +76,6 @@ extern "C" int pthread_key_delete (pthread_key_t * key); int pthread_setspecific (pthread_key_t key, const void *value); void *pthread_getspecific (pthread_key_t key); - -/* Thread signal (should be in signal.h) */ - int pthread_kill (pthread_t * thread, int sig); - int pthread_sigmask (int operation, const sigset_t * set, - sigset_t * old_set); /* ID */ pthread_t pthread_self (); Index: winsup/cygwin/include/cygwin/types.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/types.h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 types.h --- types.h 2000/02/17 19:38:31 1.1.1.1 +++ types.h 2001/03/21 08:38:19 @@ -1 +1,49 @@ -/* types.h */ +/* types.h + + Copyright 2001 Red Hat Inc. + Written by Robert Collins + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _CYGWIN_TYPES_H +#define _CYGWIN_TYPES_H + +#if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus) + + typedef void *pthread_t; + typedef void *pthread_mutex_t; + + typedef void *pthread_key_t; + typedef void *pthread_attr_t; + typedef void *pthread_mutexattr_t; + typedef void *pthread_condattr_t; + typedef void *pthread_cond_t; + +#else + +/* pthreads types */ + +typedef class pthread *pthread_t; +typedef class pthread_mutex *pthread_mutex_t; +typedef class pthread_key *pthread_key_t; +typedef class pthread_attr *pthread_attr_t; +typedef class pthread_mutexattr *pthread_mutexattr_t; +typedef class pthread_condattr *pthread_condattr_t; +typedef class pthread_cond *pthread_cond_t; + +/* semaphores types */ +typedef class semaphore *sem_t; +#endif /* __INSIDE_CYGWIN__ */ +#endif /* _CYGWIN_TYPES_H */ + +#ifdef __cplusplus +} +#endif