projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
251ac4b
)
fix mutex_trylock bug
author
weiyu
<weiyuluo1232@gmail.com>
Sat, 5 Sep 2020 00:20:23 +0000
(17:20 -0700)
committer
weiyu
<weiyuluo1232@gmail.com>
Sat, 5 Sep 2020 00:20:23 +0000
(17:20 -0700)
pthread.cc
patch
|
blob
|
history
diff --git
a/pthread.cc
b/pthread.cc
index e95fb37a3c9b079599b19ca90dd9f00d74fd66b3..e64cd134b91f4b4aebf0723adc78e283154b7c50 100644
(file)
--- a/
pthread.cc
+++ b/
pthread.cc
@@
-119,7
+119,7
@@
int pthread_mutex_trylock(pthread_mutex_t *p_mutex) {
ModelExecution *execution = model->get_execution();
cdsc::snapmutex *m = execution->getMutexMap()->get(p_mutex);
ModelExecution *execution = model->get_execution();
cdsc::snapmutex *m = execution->getMutexMap()->get(p_mutex);
- return m->try_lock();
+ return m->try_lock()
? 0 : EBUSY
;
}
int pthread_mutex_unlock(pthread_mutex_t *p_mutex) {
ModelExecution *execution = model->get_execution();
}
int pthread_mutex_unlock(pthread_mutex_t *p_mutex) {
ModelExecution *execution = model->get_execution();