summaryrefslogtreecommitdiffstats
path: root/vm/Sync.h
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2011-04-27 23:00:01 -0700
committerCarl Shapiro <cshapiro@google.com>2011-04-27 23:00:01 -0700
commitd862faa2ceae186da5518607505eb942d634ced9 (patch)
tree3854638a1851457b5f895fc6c39fa032fd90c6f9 /vm/Sync.h
parent5cdd4a3f91d3fc25c8eeca8f58e35bb6c4e908ca (diff)
downloadandroid_dalvik-d862faa2ceae186da5518607505eb942d634ced9.tar.gz
android_dalvik-d862faa2ceae186da5518607505eb942d634ced9.tar.bz2
android_dalvik-d862faa2ceae186da5518607505eb942d634ced9.zip
Get rid of uneeded extern, enum, typedef and struct qualifiers.
Change-Id: I236c5a1553a51f82c9bc3eaaab042046c854d3b4
Diffstat (limited to 'vm/Sync.h')
-rw-r--r--vm/Sync.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/vm/Sync.h b/vm/Sync.h
index 9f4592d58..14b34fdcd 100644
--- a/vm/Sync.h
+++ b/vm/Sync.h
@@ -19,10 +19,6 @@
#ifndef _DALVIK_SYNC
#define _DALVIK_SYNC
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Monitor shape field. Used to distinguish immediate thin locks from
* indirecting fat locks.
@@ -70,7 +66,6 @@ extern "C" {
struct Object;
struct Monitor;
struct Thread;
-typedef struct Monitor Monitor;
/*
* Returns true if the lock has been fattened.
@@ -80,25 +75,25 @@ typedef struct Monitor Monitor;
/*
* Acquire the object's monitor.
*/
-void dvmLockObject(struct Thread* self, struct Object* obj);
+extern "C" void dvmLockObject(Thread* self, Object* obj);
/* Returns true if the unlock succeeded.
* If the unlock failed, an exception will be pending.
*/
-bool dvmUnlockObject(struct Thread* self, struct Object* obj);
+extern "C" bool dvmUnlockObject(Thread* self, Object* obj);
/*
* Implementations of some java/lang/Object calls.
*/
-void dvmObjectWait(struct Thread* self, struct Object* obj,
+void dvmObjectWait(Thread* self, Object* obj,
s8 timeout, s4 nanos, bool interruptShouldThrow);
-void dvmObjectNotify(struct Thread* self, struct Object* obj);
-void dvmObjectNotifyAll(struct Thread* self, struct Object* obj);
+void dvmObjectNotify(Thread* self, Object* obj);
+void dvmObjectNotifyAll(Thread* self, Object* obj);
/*
* Implementation of System.identityHashCode().
*/
-u4 dvmIdentityHashCode(struct Object* obj);
+u4 dvmIdentityHashCode(Object* obj);
/*
* Implementation of Thread.sleep().
@@ -110,10 +105,10 @@ void dvmThreadSleep(u8 msec, u4 nsec);
*
* Interrupt a thread. If it's waiting on a monitor, wake it up.
*/
-void dvmThreadInterrupt(struct Thread* thread);
+void dvmThreadInterrupt(Thread* thread);
/* create a new Monitor struct */
-Monitor* dvmCreateMonitor(struct Object* obj);
+Monitor* dvmCreateMonitor(Object* obj);
/*
* Frees unmarked monitors from the monitor list. The given callback
@@ -131,7 +126,7 @@ void dvmFreeMonitorList(void);
* Returns NULL if "mon" is NULL or the monitor is not part of an object
* (which should only happen for Thread.sleep() in the current implementation).
*/
-struct Object* dvmGetMonitorObject(Monitor* mon);
+Object* dvmGetMonitorObject(Monitor* mon);
/*
* Get the thread that holds the lock on the specified object. The
@@ -139,12 +134,12 @@ struct Object* dvmGetMonitorObject(Monitor* mon);
*
* The caller must lock the thread list before calling here.
*/
-struct Thread* dvmGetObjectLockHolder(struct Object* obj);
+Thread* dvmGetObjectLockHolder(Object* obj);
/*
* Checks whether the object is held by the specified thread.
*/
-bool dvmHoldsLock(struct Thread* thread, struct Object* obj);
+bool dvmHoldsLock(Thread* thread, Object* obj);
/*
* Relative timed wait on condition
@@ -152,8 +147,4 @@ bool dvmHoldsLock(struct Thread* thread, struct Object* obj);
int dvmRelativeCondWait(pthread_cond_t* cond, pthread_mutex_t* mutex,
s8 msec, s4 nsec);
-#ifdef __cplusplus
-}
-#endif
-
#endif /*_DALVIK_SYNC*/