Async type creation.
Change-Id: I4d98446fabbf7e8a98c97f85b573a58c8a0c58c2
diff --git a/libs/rs/rsObjectBase.h b/libs/rs/rsObjectBase.h
index 59fb4a6..8d1ace1 100644
--- a/libs/rs/rsObjectBase.h
+++ b/libs/rs/rsObjectBase.h
@@ -39,6 +39,7 @@
void incUserRef() const;
bool decUserRef() const;
bool zeroUserRef() const;
+ void prelockedIncUserRef() const;
const char * getName() const {
return mName.string();
@@ -47,7 +48,6 @@
void setName(const char *, uint32_t len);
Context * getContext() const {return mRSC;}
- void setContext(Context *);
static void zeroAllUserRef(Context *rsc);
static void dumpAll(Context *rsc);
@@ -58,12 +58,17 @@
static bool isValid(const Context *rsc, const ObjectBase *obj);
+ static void lockUserRef();
+ static void unlockUserRef();
+
protected:
const char *mAllocFile;
uint32_t mAllocLine;
Context *mRSC;
private:
+ static pthread_mutex_t gObjectInitMutex;
+
void add() const;
void remove() const;