aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/thread.h
diff options
context:
space:
mode:
authorRobert Collins <rbtcollins@hotmail.com>2002-09-20 22:34:05 +0000
committerRobert Collins <rbtcollins@hotmail.com>2002-09-20 22:34:05 +0000
commit4e2822f160ec6f61d7bae8cabb4b5daad73e3f99 (patch)
tree9bdb2b552539dba326156ad748b72b4b0108c9df /winsup/cygwin/thread.h
parent1e0e64c9d84785830a384dbf2d6c70a1bea9d3c8 (diff)
downloadnewlib-4e2822f160ec6f61d7bae8cabb4b5daad73e3f99.zip
newlib-4e2822f160ec6f61d7bae8cabb4b5daad73e3f99.tar.gz
newlib-4e2822f160ec6f61d7bae8cabb4b5daad73e3f99.tar.bz2
2002-09-21 Robert Collins <rbtcollins@hotmail.com>
* thread.cc: Change verifyable_object_isvalid calls with PTHREAD_MUTEX_MAGIC and PTHREAD_KEY_MAGIC and PTHREAD_ATTR_MAGIC to ::isGoodObject() calls throughout. (MTinterface::Init): Remove dead code. (pthread_attr::isGoodObject): Implement. (pthread_key::isGoodObject): Implement. (pthread_mutex::isGoodObject): Implement. (pthread_mutex::isGoodInitializerOrObject): Implement. (pthread::isGoodObject): Update signature. * thread.h (pthread_key::isGoodObject): Declare. (pthread_attr::isGoodObject): Ditto. (pthread_mutex::isGoodObject): Ditto. (pthread_mutex::isGoodInitializerOrObject): Ditto. (pthread::isGoodObject): Change to a const parameter for const correctness. (pthread_mutexattr::isGoodObject): Declare. (pthread_condattr::isGoodObject): Ditto. (pthread_cond::isGoodObject): Ditto. (semaphore::isGoodObject): Ditto.
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r--winsup/cygwin/thread.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
index 23fe01f..9238153 100644
--- a/winsup/cygwin/thread.h
+++ b/winsup/cygwin/thread.h
@@ -176,6 +176,7 @@ verifyable_object_state verifyable_object_isvalid (void const *, long, void *);
class pthread_key:public verifyable_object
{
public:
+ static bool isGoodObject (pthread_key_t const *);
DWORD dwTlsIndex;
void *fork_buf;
@@ -228,6 +229,7 @@ private:
class pthread_attr:public verifyable_object
{
public:
+ static bool isGoodObject(pthread_attr_t const *);
int joinable;
int contentionscope;
int inheritsched;
@@ -241,6 +243,7 @@ public:
class pthread_mutexattr:public verifyable_object
{
public:
+ static bool isGoodObject(pthread_mutexattr_t const *);
int pshared;
int mutextype;
pthread_mutexattr ();
@@ -250,6 +253,8 @@ public:
class pthread_mutex:public verifyable_object
{
public:
+ static bool isGoodObject(pthread_mutex_t const *);
+ static bool isGoodInitializerOrObject(pthread_mutex_t const *);
CRITICAL_SECTION criticalsection;
HANDLE win32_obj_id;
LONG condwaits;
@@ -290,7 +295,7 @@ public:
virtual ~pthread ();
static void initMainThread(pthread *, HANDLE);
- static bool isGoodObject(pthread_t *);
+ static bool isGoodObject(pthread_t const *);
static void atforkprepare();
static void atforkparent();
static void atforkchild();
@@ -356,6 +361,7 @@ class pthreadNull : public pthread
class pthread_condattr:public verifyable_object
{
public:
+ static bool isGoodObject(pthread_condattr_t *);
int shared;
pthread_condattr ();
@@ -365,6 +371,7 @@ public:
class pthread_cond:public verifyable_object
{
public:
+ static bool isGoodObject(pthread_cond_t *);
int shared;
LONG waiting;
LONG ExitingWait;
@@ -393,6 +400,7 @@ public:
class semaphore:public verifyable_object
{
public:
+ static bool isGoodObject(semaphore **);
HANDLE win32_obj_id;
class semaphore * next;
int shared;