projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
034a728
)
add wait/notify
author
bdemsky
<bdemsky>
Sun, 3 Apr 2011 05:38:59 +0000
(
05:38
+0000)
committer
bdemsky
<bdemsky>
Sun, 3 Apr 2011 05:38:59 +0000
(
05:38
+0000)
Robust/src/Runtime/object.c
patch
|
blob
|
history
Robust/src/Runtime/object.h
patch
|
blob
|
history
diff --git
a/Robust/src/Runtime/object.c
b/Robust/src/Runtime/object.c
index 14d12050d317e3a41380e56776f6766198c87d86..cdf75048084c6cdf6b71c6e5e209bbc0b903e41f 100644
(file)
--- a/
Robust/src/Runtime/object.c
+++ b/
Robust/src/Runtime/object.c
@@
-69,20
+69,24
@@
int CALL01(___Object______MonitorEnter____, struct ___Object___ * ___this___) {
}
#endif
}
}
#endif
}
+#ifdef D___Object______notify____
void CALL01(___Object______notify____, struct ___Object___ * ___this___) {
pthread_mutex_lock(&objlock);
pthread_cond_broadcast(&objcond);
pthread_mutex_unlock(&objlock);
}
void CALL01(___Object______notify____, struct ___Object___ * ___this___) {
pthread_mutex_lock(&objlock);
pthread_cond_broadcast(&objcond);
pthread_mutex_unlock(&objlock);
}
-
+#endif
+#ifdef D___Object______notifyAll____
void CALL01(___Object______notifyAll____, struct ___Object___ * ___this___) {
pthread_mutex_lock(&objlock);
pthread_cond_broadcast(&objcond);
pthread_mutex_unlock(&objlock);
}
void CALL01(___Object______notifyAll____, struct ___Object___ * ___this___) {
pthread_mutex_lock(&objlock);
pthread_cond_broadcast(&objcond);
pthread_mutex_unlock(&objlock);
}
-
+#endif
+#ifdef D___Object______wait____
void CALL01(___Object______wait____, struct ___Object___ * ___this___) {
//release lock
void CALL01(___Object______wait____, struct ___Object___ * ___this___) {
//release lock
+ pthread_t self=pthread_self();
int lockcount=VAR(___this___)->lockcount;
if (VAR(___this___)->___prevlockobject___==NULL) {
pthread_setspecific(threadlocks, VAR(___this___)->___nextlockobject___);
int lockcount=VAR(___this___)->lockcount;
if (VAR(___this___)->___prevlockobject___==NULL) {
pthread_setspecific(threadlocks, VAR(___this___)->___nextlockobject___);
@@
-127,6
+131,7
@@
void CALL01(___Object______wait____, struct ___Object___ * ___this___) {
}
}
}
}
}
}
+#endif
int CALL01(___Object______MonitorExit____, struct ___Object___ * ___this___) {
#ifndef NOLOCK
int CALL01(___Object______MonitorExit____, struct ___Object___ * ___this___) {
#ifndef NOLOCK
diff --git
a/Robust/src/Runtime/object.h
b/Robust/src/Runtime/object.h
index 8c177340246dd97f23a7189e9e51394e29786b58..1c430450fe8db74090cfb023d31b8d6d8d6146cb 100644
(file)
--- a/
Robust/src/Runtime/object.h
+++ b/
Robust/src/Runtime/object.h
@@
-13,5
+13,14
@@
int CALL01(___Object______getType____, struct ___Object___ * ___this___);
#ifdef THREADS
int CALL01(___Object______MonitorEnter____, struct ___Object___ * ___this___);
int CALL01(___Object______MonitorExit____, struct ___Object___ * ___this___);
#ifdef THREADS
int CALL01(___Object______MonitorEnter____, struct ___Object___ * ___this___);
int CALL01(___Object______MonitorExit____, struct ___Object___ * ___this___);
+#ifdef D___Object______notify____
+void CALL01(___Object______notify____, struct ___Object___ * ___this___);
+#endif
+#ifdef D___Object______notifyAll____
+void CALL01(___Object______notifyAll____, struct ___Object___ * ___this___);
+#endif
+#ifdef D___Object______wait____
+void CALL01(___Object______wait____, struct ___Object___ * ___this___);
+#endif
#endif
#endif
#endif
#endif