]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_utilities/lib/threading.h
Security-59306.61.1.tar.gz
[apple/security.git] / OSX / libsecurity_utilities / lib / threading.h
index 4de9ab4f1532d1f22fe46b5035f22e6e73032c8a..5886f0475c61567447b3fb7965689b6f0667defd 100644 (file)
@@ -152,6 +152,13 @@ public:
        ~RecursiveMutex() {}
 };
 
+class NormalMutex : public Mutex
+{
+public:
+    NormalMutex() : Mutex(normal) {}
+    ~NormalMutex() {}
+};
+
 //
 // Condition variables
 //
@@ -373,25 +380,6 @@ public:
 //
 class Thread {
     NOCOPY(Thread)
-public:
-    class Identity {
-        friend class Thread;
-        
-        Identity(pthread_t id) : mIdent(id) { }
-    public:
-        Identity() { }
-        
-        static Identity current()      { return pthread_self(); }
-
-        bool operator == (const Identity &other) const
-        { return pthread_equal(mIdent, other.mIdent); }
-        
-        bool operator != (const Identity &other) const
-        { return !(*this == other); }
-    
-    private:
-        pthread_t mIdent;
-    };
 
 public:
     Thread() { }                               // constructor
@@ -405,8 +393,6 @@ protected:
     virtual void action() = 0;         // the action to be performed
 
 private:
-    Identity self;                             // my own identity (instance constant)
-
     static void *runner(void *); // argument to pthread_create
 };